The SmartNavigation Property

ASP.NET has a feature called smart navigation that can greatly

enhance the user experience of a Web page for users of Internet

Explorer 5.0 or higher browsers. The following list summarizes the

enhancements provided by smart navigation:

á Persists element focus between postbacks—When a postback

occurs, the active control on the Web page loses its focus.

Anyone using a 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, the

information about the active control is persisted between postbacks

to the server.

á Persists scroll position between postbacks—When a postback

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 postback, the form will be

positioned at the beginning and user has to scroll down to

find her last data entry position. However, when smart navigation

is enabled, the information about the scroll position persists

between postbacks to the server.

á Eliminates page flash caused by page postback—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 page postback operations in which 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.

á Prevents each postback from being saved in the browser

history—Normally, every postback 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 in the browser’s history.

Smart navigation is specified by the SmartNavigation property of the

Page class. The default value of this property is false, which disables

smart navigation for the Web form.

<%@ Page language=”c#”

Codebehind=”StepByStep3_2.aspx.cs”

AutoEventWireup=”false”

Inherits=”_315C03.StepByStep3_2”

SmartNavigation=”true”

%> at page level

you can make the following changes to the web.config file:

to entire webapplication

 bapiraju (.net developer) 

  worldtech 

 [email protected]