.net 客户端触发服务器端控件的事件
Button2触发Button1的服务器端事件。
1.Button1/Button2都是服务器端的控件。在客户端通过点击Button2来触发Button1的服务器端事件:
Button2.Attributes.Add("onclick", "forms[0].Button1.click();return false;");
Button2.Attributes.Add("onclick", "forms[0].Button1.click();return false;");
2.如果Button2是普通的html按钮,那更简单了:
<input type="button2" name="Button2" value="Button2" id="Button2" onclick="forms[0].Button1.click()"/>
<input type="button2" name="Button2" value="Button2" id="Button2" onclick="forms[0].Button1.click()"/>
诗词在线
http://www.chinapoesy.com
诗词在线 |唐诗|宋词|元曲|现代诗歌|外国诗歌
126在线阅读网
http://www.Read126.cn
126在线阅读网 人物传记、古典名著、历史书籍。。。
http://www.chinapoesy.com
诗词在线 |唐诗|宋词|元曲|现代诗歌|外国诗歌
126在线阅读网
http://www.Read126.cn
126在线阅读网 人物传记、古典名著、历史书籍。。。
浙公网安备 33010602011771号