Click here to Skip to main content
15,904,155 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Ok. I have a form that has a button that I got from the HTML toolbox that is a reset button. I renamed the button to Clear Form. When a user types into the textboxes and and then clicks on the Clear Form button, it clears some of the textboxes but not all. The textboxes that does not clear are the ones that does auto calculations. Why is this happening? Is there a way to fix it?

HTML
<td>
                <input id="Reset1" type="reset" value="Clear Form" 
                     önclick="return Reset1_onclick()" /></td>
            <td>
Posted
Comments
♥…ЯҠ…♥ 15-Nov-13 8:08am    
Lets start it from here.... about to leave for a day with in 30 mins.... what is the status now?
Computer Wiz99 15-Nov-13 8:10am    
I have a new post called RangeValidator is not working.

1 solution

Hi,

Are you trying to access server side code,
Try to add runat="server" attribute to the control
This will possibly resolve the problem.

Hope this helps you a bit.

Regards,
RK
 
Share this answer
 
Comments
Computer Wiz99 13-Nov-13 9:05am    
RK, Thanks for the code but it still will not work. I also forgot to say that I have two sets of textboxes. In all I have 53 textboxes. They all are populated from the database. There are 21 textboxes that I would like to keep the data in but the rest can be cleared. Is that possible?
♥…ЯҠ…♥ 13-Nov-13 23:01pm    
Yes of course it is possible to clear any number of text boxes, can you able to call Reset1_onclick() function? is it server side function or javascript function?
Computer Wiz99 14-Nov-13 7:36am    
Thanks for the code and everything, but I have deleted the Clear button.
Computer Wiz99 15-Nov-13 5:24am    
RK, this is for the range validation. I have the code you provide but what about if it is lower than 20% and where do I put this code? In page_load or button submit?
♥…ЯҠ…♥ 15-Nov-13 5:34am    
that means, if its 20% lesser than the textbox1 value.. then use this RangeValidator1.MinimumValue = Convert.ToString(100 - Convert.ToInt32(TextBox1.Text) * 20 / 100);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900