简体   繁体   English

警报显示在Modal Popup asp.net的顶部

[英]Alert display on top of Modal Popup asp.net

I'm wondering how, if possible, to display an alertbox over a modal pop. 我想知道如何(如果可能)在模式弹出窗口上显示警报框。 I'm using the modal popup extender to display a form which the user fills out. 我正在使用模式弹出扩展器来显示用户填写的表单。 On the form there are fields that the user must fill out, if they don't fill out a field and click submit then I want to display an alert box. 表单上有用户必须填写的字段,如果他们没有填写字段并单击“提交”,那么我想显示一个警报框。 As it is right now, I can't get the alertbox to display at all while the modalpopup is still active. 目前,在modalpopup仍处于活动状态时,我根本无法显示警报框。 Here is the code for the alertbox I'm trying to use: 这是我要使用的警报框的代码:

   Page.ClientScript.RegisterStartupScript(this.GetType(), "error", "alert('Please coomplete all of the required fields');", true);
 string Msg = "Your Message";
            Response.Write(@"<script language='javascript'>alert('" + Msg + " .');</script>");

It works fine for me 这对我来说可以

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM