I have a small control on my main page. In the login control, I use the LinkButton button to submit, because I like the way it looks.
However, I also use jQuery to capture when I press the 'enter' key in any of the input control text boxes. It is hard to trigger the click event of a link button with jQuery in every browser. I even tried hardcoding __doPostBack, but the ID of LinkButton is just a little different from that in the built-in attribute href = "__ doPostBack" on the control. It does not respond to .trigger (), click (), etc.
On the other hand, a regular Button control works just fine with jQuery click (). But I'm not a big fan of buttons, and my CSS skills are limited. Is there an easy way to create a regular ASP.NET control to look like a link? Or is there an easy way to get LinkButton to behave with jQuery? I will choose which method takes less effort. :)
Thanks in advance.
source
share