Possible to use a link control to validate and submit a form? What would be the code to tie the click event of the link control to the submission functions? (I prefer link buttons much more than input buttons for styling across browsers.)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s a control built in for this: LinkButton.
Instead of
<asp:Button />use<asp:LinkButton />to render an<a ... />link, style it as you wish 🙂You use it the same way as you do a
Buttoncontrol, assign a handler to it’sOnClickevent, etc, whatever you need to do. The handling from your code’s perspective is very similar, identical in most cases.