When users click on the browser refresh button, the page resubmits and executes code associated with the last button clicked….not good. To prevent this problem do the following.
1. Add SmartNavigation to the page
Change this
<%@Page language=”c#” Codebehind=”Webform2.aspx.cs” AutoEventWireup=”false” Inherits=”WebApplication2.WebForm2” %>
to this
<%@Page language=”c#” Codebehind=”Webform2.aspx.cs” AutoEventWireup=”false” Inherits=”WebApplication2.WebForm2” SmartNavigation=”true”%>
2. Verify that .NET 1.1 Framework is installed on the web server
From the “Start” button, select “Control Panel”. Then select “Add or Remove Programs”. Scroll down the list of installed items and look for Microsoft .Net Framework 1.1. If not found, you can download it from www.microsoft.com or msdn.microsoft.com.
3. Verify that ASP.Net client script library 1_1_4322 is available
Look for folder [WEBROOT}\aspnet_client\system_web\1_1_4322. If it does not exist, create the path and extract file 1_1_4322.zip into the folder.
4. Close the browser and then test the page….the problem is gone