关闭模式弹出窗口
问题描述:
我想在esc键上关闭模式弹出窗口
我使用了母版页,并在母版页上放置了一个模式弹出框
客户端页面上的3和modelpopup继承相同的母版页
请帮助我关闭esc键中的模式弹出窗口
I want close modal popup on esc key press
i used master page and place one modal popup on master page
and 3 modelpopup on client page which inherit the same master page
please help me to close modal popup in esc key press
答
在该弹出窗口的Keypress事件中,检查以下键
In Keypress event of that popup check the below key
if(e.KeyChar == (char)27)
{
yourpopup.visible = false;
}