|
-
Apr 2nd, 2004, 05:21 AM
#1
Thread Starter
Frenzied Member
AutopostBack
I have a form including a scrollbar. If I click a checkbox some of the content becomes invisible. But if I do that at the bottom of the page, then the page reloads and goes to the top. That's not smart! I wish to solve this without JS but I see some problems using AutopostBack. Isn't it possible to reload the page where the scrollbar was placed?
-
Apr 2nd, 2004, 08:20 AM
#2
I wonder how many charact
There is a way if you use AutoPostBAck, in which you have a hidden value field in there, and you attach an anchor to the row/cell in which the value lies, but then again, i think that relies on javascript. I will have to check when i get back to work.
and the other solution, you obviously know about is element.scrollIntoView(); which only works in IE5 + I believe.
I don't really understand your reservations about Javascript, since it really is a must in modern websites these days.
If you turn of javascript and visit many 'super duper' sites, you will find they alert you that either you cannot use the site, or much of the functionality will be broken. (Same if you block cookies).
-
Apr 2nd, 2004, 12:30 PM
#3
Thread Starter
Frenzied Member
The reason why I don't want to use JS is that all my combo boxes are based on database connections, and that is not great using JS.
But I will look at the element.scrollIntoView(), I haven't used that before. Do you think this would solve the problem?
-
Apr 2nd, 2004, 02:31 PM
#4
I wonder how many charact
document.scrollIntoView is a javascript function of Internet Explorer.
So, no, it won't solve your problem if you can't use jscript.
Having javascript enabled doesn't mess with your comboboxes, even if they are databound on code-behind.
All, this jscript will do is scroll the presentation layer, it does not change values of anything.
-
Apr 2nd, 2004, 09:28 PM
#5
PowerPoster
Put the smartNavigation on.
You can do it per page in the page directive, or you can do it in the web.config as shown below:
<configuration>
<system.web>
<pages smartNavigation="true">/
</system.web>
</configuration>
-
May 22nd, 2005, 08:39 PM
#6
Member
Re: AutopostBack
 Originally Posted by hellswraith
Put the smartNavigation on.
You can do it per page in the page directive, or you can do it in the web.config as shown below:
<configuration>
<system.web>
<pages smartNavigation="true">/
</system.web>
</configuration>
legend, this totally works
damn, now i need to learn all the nifty tags associated with webconfig
-
May 24th, 2005, 09:55 PM
#7
Lively Member
-
May 25th, 2005, 06:02 AM
#8
I wonder how many charact
Re: AutopostBack
Well, I thought we had a thread about this long ago and agreed SmartNavigation was broken because it really messes up css and DOM manipulation - and acts erratically. http://weblogs.asp.net/ksamaschke/ar...4/27/6085.aspx
http://www.codeproject.com/aspnet/lili.asp
http://www.aewnet.com/nntp/id-117893.html
Now I hear Hellswraith and Mendhak promoting it - what's going on here? Have you two found a fix that I haven't?
If a person was to put focus back to where it was before postback, javascript is the only real true friend here...
http://www.aspnetpro.com/NewsletterA...200309bm_l.asp
Last edited by nemaroller; May 25th, 2005 at 06:07 AM.
-
May 26th, 2005, 08:46 PM
#9
PowerPoster
Re: AutopostBack
 Originally Posted by nemaroller
If you will notice, that post is over a year old (04-02-2004). This thread was brought back to life. I use custom javascript to set focus after postback now, as I did have some problems with SmartNavigation. Now, it isn't totally broke, it did work on some of the pages I developed, but as I got more skilled with asp.net, my applications became more complex and out grew the SmartNavigation real quick.
-
May 27th, 2005, 08:21 AM
#10
Lively Member
Re: AutopostBack
that's nice..
actually can you pinpoint me to something?
i got two pages of aspx...now, when i go to the second back and go back trough hyperlink......why the first page's settings (checkbox, buttons, blabla) all gone?
does this has to do anything with session? please help me =)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|