ASP.NET 2.0 SmartNavigation vs MaintainScrollPositionOnPostback?

C

cmay

I have just started created a web app in asp.net 2.0.

I am using a masterpage for header/footer stuff.

In my content page I am using MaintainScrollPositionOnPostback, and
while it does keep the scroll position there is a lot of flicker on
postback where as when I did this with asp.net 1.1 you could hardly
tell that a postback has happening.

Is there something else I need to do or did ASP.NET 2.0 remove the
flicker remove part of smartnav and just leave the part that maintains
the scroll position (thus the new name)?
 
G

Guest

Cmay,

"AJAX" is currently only way to completely get rid of page flicker. I've
found page flicker caused by the maintainscrollposition varys by how much the
browser has to render, how far it moves down the page, and is much more
apparent in debug mode.

Check out this. New in ASP.Net 2.0 controls support focus
http://msdn2.microsoft.com/en-us/library/system.web.ui.control.focus.aspx

The focus method above doesn'tt solve your flicker problem but you can
programatically control the postion of the page on postback. Example button
click event just call button.focus then on the postback the page comes right
back to the button.

Good Luck
DWS
 
C

cmay

DWS,

SmartNavigation does a lot more than just remember the position of the
scroll. As I understand it, it gets rid of nearly all the flicker by
loading the postback page in a hidden iframe, and then transfering that
content to the "visible" window when the iframe is done loading.

SmartNavigation is also very nice when you have a form that does a lot
of auto postbacks because SmartNav will not fill up your browsers Back
button with a new entry for each postback!

If smartnav is truly gone I will be really disappointed. The first
website I am building in asp.net 2.0 looks pretty crappy compared with
asp.net 1.1.
 
C

cmay

I did some more investigation and found that SmartNavigation has been
deprecated in asp.net 2.0.

However, it seems to work if you just manually type it into your page
directive, even though it doesn't show up in intellisense or in the
page property window.

When I had SmartNavigation and MaintainScrollPositionOnPostba­ck both
set it caused a stack overflow, but it looks like it is working ok
after turning off MaintainScrollPositionOnPostba­ck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top