SmartNavigation is neat, but I have also had it cause problems. It uses this method of implementing some iframes and a bunch of javascript. It think what it's actually doing is posting the page to the hidden iframe, then taking the result and repainting the visible window with it. If you watch closely you'll actually see 2 or 3 page requests being made in the browser. It's black magic to me!
I've noticed that sometimes a page doesn't give me that "This page requires a re-post" prompt when I refresh or go back or forward. It's strange. I found that it was being caused by smart nav.
I create this method before I realized what smart navigation was. Add 2 hidden form fields to the form, and write the current page position (scrollTop and scrollLeft) to those fields in the body onScroll handler. Then when the page is posted back you can grab those values in the ASPX code and write a bit of javascript to SET those values when the page loads in the client. One drawback to this is that you don't get the focus back on the current control like in SmartNavigation. However, there is one major advantage to this method, even though it's not as "pretty" as SmartNavigation: it works in other browsers. When SmartNav is on, you only get it in I.E. (at least from what I have seen).
Peter
------------------------------------------------------
Work smarter, not harder.
|