开发者

How to make an link execute a button onclick code?

How can I make a link (anchor) fire a button onclick code while the link is sitting in an Web User Control and the button is sitting in the main .aspx page.

What I'm trying to accomplish this is to be to export a gridview to excel from a too开发者_如何转开发lbar/utility bar that is sitting in the Web User Control.

Any help will really appreciate it.


<a href="#" onclick="document.getElementById('B').click();">hello</a>
<input type="button" id="B" onclick="alert('HA!');" />


Create a server side hyperlink and add Button1_click() to hyperlink click event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜