Question : asp.net My form is retaining a value in a TextBox once submited??

I have this code in a form that is used to setup a search criteria...the problem here....is, once I input a parameter value, I can not clear it.  But before I use any value that I enter, to search on...I can clear the value using my Reset Button. But once I use the value enter.. to do a search. I can not clear the value from the text box. I have to re-enter the application???

    <tr>
          <td class="style20">Zip Code:<br />
          <asp:TextBox ID="txtZip" name="txtZip" runat="server" class="style20"
         style="width:52px;"></asp:TextBox>&nbsp;


something is missing from the page causing it to retain it value???

Answer : asp.net My form is retaining a value in a TextBox once submited??

Like I said above, I had to add another button to reload the page to actually clear that value.  "Resetting" a form with a 'reset' button ALSO reloads the Original form data.  That's the way that browsers do that.  All browsers.

The way that banks handle that problem is to clear all values every time with an 'onload' function in the body tag.  <body onload="clearall();">   You have to write the clearall() function for your page.  If you do that, then it doesn't matter what was there, it gets erased on page load and page refresh every time.
Random Solutions  
 
programming4us programming4us