Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I have two button in Asp.net html form,
I am using "required" attribute for textbox but it's getting problem because in have two button "Submit" and "Reset".
"Submit" button its ok for that required but i don't need required in "Reset" case.

So, how to resolve this issue.

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer
Posted
Comments
Patrice T 29-Sep-15 1:41am    
Planing to show the code corresponding to buttons ?
Palash Mondal_ 29-Sep-15 1:47am    
Please post the HTML markup also for the submit & reset buttons.

1 solution

If I got your question correctly, then do this:
If you're using <asp:button ...="" xmlns:asp="#unknown" />, you have to specify the required attribute for it. Instead you can use pure HTML button like this,
<button type="reset">Clear</button>.

-KR
 
Share this answer
 

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