What is smartnavigation property used for in ASP.NET? Kindly provide me an example to understand this concept better.
Printable View
What is smartnavigation property used for in ASP.NET? Kindly provide me an example to understand this concept better.
ASP.NET has a feature called smart navigation that can greatly enhance the user experience of a Web page for the users of Internet Explorer 5.0 or higher browsers. The following list summarizes the enhancements provided by smart navigation:
Persisting element focus between post backs: When a post back occurs, the active control on the Web page loses its focus. Those using the keyboard for navigation will have to press the Tab key several times to return to their original position of data entry. However, when smart navigation is enabled information about the active control is persisted between post backs to the server.
Persisting scroll position between post backs: When a post back occurs, the browser loses the record of the scroll position of the page. This can be especially annoying in the case of large data entry forms because after post back, the form will be positioned at the beginning and the user will have to scroll down to find his last data entry position. However, when smart navigation is enabled, the scroll position persists between post backs to the server.
Eliminate page flash caused by page post back: When users navigate from one page to another, the old page is destroyed and the new one is created on a blank screen. Depending on the user's video card and display setting, this operation can cause a small flash to occur. This flash is especially noticeable during the page post back operations where the visual contents of the page do not change significantly between the two page requests. When smart navigation is enabled, ASP.NET uses a technique called double buffering to eliminate this flash from occurring.
Prevents each post back from being saved in the browser history: Normally, every post back to an ASP.NET page causes an entry to be created in the browser's history. This defeats the purpose of the browser's back button because instead of going back to the previous page, users are taken to the previous state of the current page. Smart navigation prevents this from happening by saving only the latest state of the current page to be saved in the browser's history.