Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 27, 2007 04:16 AM by danyeung
Mar 18, 2007 03:55 PM|LINK
Mar 18, 2007 04:08 PM|LINK
There is a complete solution posted here:
though Josh's solution is essentially the same.
Mar 18, 2007 10:34 PM|LINK
Mar 18, 2007 10:58 PM|LINK
I use this code on a client's web site that has several grid views on one page so that when they click to sort/page the gridview, their scroll position is retained. When you sort/page a gridview, it is done on postback. Therefore, I know this works with
any postback from anything. That is it's entire purpose!!!!!
You couldn't be putting an alert where you were and get it to display the right values becuse you would never get an opportunity to scroll!
You have to put the onload parameter on teh <body> tag of the page that you want to remember the scroll position. So if you have frames, it wont work if you are using it on the page thta contains the <frameset>!!!!
Try different combinations or something, becuase I can 100% assure you the code I provided works perfectly.
Mar 18, 2007 11:07 PM|LINK
Mar 19, 2007 12:42 PM|LINK
I think using frame caused the problem. It is an existing application. I am adding on new form. Is there a solution? Thanks.
Mar 19, 2007 01:26 PM|LINK
Put an alert in the SetScrollCoords() function and tell me if you ever see it.
If you do, post all of your source code so I can try to find your problem. If not, you didn't follow my example.
Mar 19, 2007 04:26 PM|LINK
Here's what I used to do in 1.1 ... I originally posted this at:
In your Global.asax page, pop the following script to catch the postback event and take the appropriate action...
Mar 19, 2007 06:32 PM|LINK
That looks nice but how well does it work in all browsers?
Mar 20, 2007 03:59 AM|LINK