Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Creating a Reset Button - ASP.NET

RSS
Modified on Thu, May 21, 2009, 9:34 AM by Administrator Categorized as ASP·NET Web Forms, HTML and CSS
In classic ASP, creating a reset button was done simply via <input type="reset">. In ASP.NET, this is unavailable, so the following code must be employed.

<asp:Button 
    runat="server" 
    ID="uxResetButton" 
    Text="Reset" 
    OnClientClick="this.form.reset();return false;" 
    />

Another option is the following code.

<asp:Button  
    runat="server"  
    ID="uxResetButton"  
    Text="Reset"  
    OnClientClick="window.location.href = 'MyPage.aspx'"

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.