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 :)

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top