ReScroller 1.0 for .NET
This code is an ASP.NET (VB) custom server control to maintain the browser's scroll position after postback. Unlike the .NET/IE SmartNavigation feature, it works with all browsers and does not produce weird quirks.
2. Change the namespace if you wish to bundle it into one of you existing control assemblies, otherwise leave at as is, but you will need to register it on the page (and in Visual Studio).
3. Compile the control to an assembly / dll.
4. Register the assembly in your page (if you used my namespace):
TagPrefix="HB" NameSpace="Bean.Controls" Assembly="ReScroller"
5. Insert this tag inside the form tag of your page:
<HB:ReScroller id="rescroller" runat="server" />
6. That's It! It will automatically work now.
Inserting SmartNavigation="True" into the page declaration of your aspx page will provide similar functionality to this control, but it has some major failings. I got very excited the first time I used it, but then after a while I started to notice a lot of badness:
suppose to work with IE. I've heard it may work with some other very
new browsers, but this is unconfirmed.
2. It breaks the .focus() method.
use, copy, modify, and distribute this software and its documentation
for any purpose and without fee is hereby granted, with only one
condition: References to the original author in the comments of the
source code/scripts must remain in place. No other conditions or
restrictions are made.
This software is provided "as is" without express or implied warranty.
If you improve this code, please send me a copy! Thanks!
Donate via PayPal
hunter @ beanland.net.au