asp.net ajax 中的ModalPopupExtender的问题
ModalPopupExtender配置如下
<cc1:ModalPopupExtender ID= "ModalPopupExtender1 " runat= "server "
TargetControlID= "LogOff "
PopupControlID= "ConfirmtionPanel "
OkControlID= "YesButton "
CancelControlID= "NoButton "
BackgroundCssClass= "modalBackground ">
</cc1:ModalPopupExtender>
我想点一linkbutn出现下面的选择.
<asp:Panel ID= "ConfirmtionPanel " runat= "server " CssClass= "modalPopup " Style= "display: none ">
<div class= "modalPopup-text ">
你真的要退出吗? <br />
<br />
<asp:Button ID= "YesButton " runat= "server " Text= "是 " Width= "30px " OnClick= "YesButton_Click "/>
<asp:Button ID= "NoButton " runat= "server " Text= "否 " Width= "30px "/>
</div>
</asp:Panel>
我想在出现的这个提示框中点YesButton按钮,以执行它的OnClick= "YesButton_Click "事件,可是程序能正常显示特效,但无法执行该事件
protected void YesButton_Click(object sender, EventArgs e)
{
FormsAuthentication.SignOut();
Cache.Remove( "user ");
Cache.Remove( "passwd ");
Cache.Remove( "rol ");
Cache.Remove( "deptid ");
Response.Redirect( "Default.aspx ", false);
}
------解决方案--------------------