Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2004, 09:13 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default Alternative to Smart Navigation

I think the designation "Smart Navigation" is a misnomer. I think it could have been implemented much better. (and it won't work for me)

I need a solution to retain my scroll position on postback.

With this in mind, I have been poking around looking for alternatives. However, all I have found falls into these categories:
1. Doesn't work
2. Difficult to implement
3. Has to be translated into VB.NET

Is anyone using a solution to this problem?

Thanks in advance for your comments.

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.
 
Old July 27th, 2004, 09:20 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Put a hidden form input control on the page, make it runat="server" so the value is retained on postback. Use the <body onScroll=""> event to save the current scroll position (document.body.scrollTop) of the page into that hidden input. Use the onLoad event to set the body's scroll position to the value stored within that hidden input. You may also do the same for the horizontal scroll (scrollLeft).
 
Old July 27th, 2004, 09:20 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Also, Smart Navigation only works for IE.
 
Old July 27th, 2004, 09:27 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Yes, smart nav works only in IE because of the use of Iframes.

The solution I posted does work in Netscape. Although you get a "flicker" when the page loads!
 
Old July 27th, 2004, 10:11 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 218
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you!! This is exactly what I was hoping for.

- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Smart ideea needed crisan Access 12 September 10th, 2005 10:04 AM
Smart navigation Baby_programmer ASP.NET 1.0 and 1.1 Basics 2 August 31st, 2004 06:28 AM
So called Smart Navigation!!! salmndr VS.NET 2002/2003 1 March 29th, 2004 08:58 AM
smart device extensions aadz5 C# 0 January 7th, 2004 05:16 PM
Smart Navigation in IE4 Ghost ASP.NET 1.x and 2.0 Application Design 1 July 25th, 2003 07:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.