Question

I have asp:LinkButton (submit button) and it works properly in every browser. However, in safari it works only if user clicks the submit button and doesn't work if enter is pressed. How can I solve this? I just want this to work similarly in every browsers.

Thanks in advance :)

Was it helpful?

Solution

A LinkButton control turns into an <a> tag in html with a javascript onclick event which will trigger a postback to your webform. What I would do is view the source of the page and find this onclick javascript code, then follow the instructions in this stackoverflow post to add an enter key handler to your linkbutton:

JS enter key press handler

In the event handler for the enter key, put in the onclick code you found from the html source.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top