Groups | Blog | Home
all groups > dotnet general > november 2004 >

dotnet general : Going to a position in Web page after page refresh


WM Chung
11/18/2004 9:55:01 PM
Hi all,

I have a long Web page which need vertical scrolling. If I work on the GUI
at bottom of Web page, e.g. clicking a button or selecting an item in List
box, the page refreshes. After page refreshing, the page is automatically
located at the top. This is inconvenient as I need to scroll back to the
location at which I work. Can it be located at the original location, instead
of the top, after the page refreshing ?

Thanks in advance.
John M Deal
11/18/2004 10:47:23 PM
Here's a link to a page that shows how this can be done:

http://www.codeproject.com/aspnet/AspNetScrollbarMove.asp

Hope it helps.

Have A Better One!

John M Deal, MCP
Necessity Software

[quoted text, click to view]
Saurabh Nandu
11/18/2004 11:29:12 PM
Try enabling SmartNavigation=true on the ASP.NET web page. This will auto
generate a script that will return the user back to the position he was
before the PostBack. Although this script works generally on IE only.
C-Services Holland b.v.
11/19/2004 11:27:25 AM
[quoted text, click to view]

Using HTML anchors could do the trick. Just tell it in the URL to goto a
specific anchor.


--
Rinze van Huizen
jdn
11/19/2004 10:21:24 PM

[quoted text, click to view]

Or better, create a JavaScript function that will accomplish this and wrap
it in a .NET function.

jdn

AddThis Social Bookmark Button