验证后未显示ModalPopupExtender [英] ModalPopupExtender not displaying after validation

查看:73
本文介绍了验证后未显示ModalPopupExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有三个文本字段和提交按钮的modalpopupextender.
所有字段都是必填字段,因此我给出了要在模式弹出窗口中显示的消息.
当我单击链接按钮时,将显示此模式弹出窗口.
当我在没有任何文本框中输入值的情况下按确定按钮时,modalpopup消失.
再次单击链接按钮时,它会显示带有验证消息的modalpopup.

在此先感谢

I have a modalpopupextender with threee text fields and submit button.
All the fields are mandatory, hence I have given message to display in the modal popup.
This modalpop will be displayed when I click a linkbutton.
When I press the ok button without giving the value in any of the text boxes, the modalpopup disappears.
Again when I click the link button it shows the modalpopup with the validation message.

Thanks in advance

推荐答案

//server side 

Protected void LinkButton1_click(object sender, EventArgs e)
{
  ModalPopUpExtender1.Show();
}

// ok button click event
//check for TextBoxs values
if(TextBoxs are empty)
{
  //Redirect to Parent page.
}
else
{
 // Your code..

}


此链接将对您有所帮助.
http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ModalPopup/ModalPopup.aspx [ ^ ]
this link would be helpful.
http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ModalPopup/ModalPopup.aspx[^]


这篇关于验证后未显示ModalPopupExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆