如何将警报消息代码转换为AjaxModalPopup代码 [英] how to convert alert message code to AjaxModalPopup code

查看:71
本文介绍了如何将警报消息代码转换为AjaxModalPopup代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i需要将javascript警告更改为ajax模式弹出警报。



如何将警报消息代码转换为AjaxModalPopup代码



在这行以c#.same编写的javascript里面的ajax popup打开。





 protected void Page_Load(object sender,EventArgs e)
{
if(Request [CalledFrom]。ToString()!=ATL)
{
string js = null;
js =< script language =' javascript' < span class =code-keyword>> alert('以下课程已获得管理员批准')< / script > ;
Page.RegisterStartupScript(js,js);
}
}

解决方案

引用:

如何在不使用ajaxtoolkit的情况下编写代码?

简单地说,不可能。



您必须使用它才能实现 Ajax ModalPopupExtender [ ^ ]。




在这个代码服务器端。代码运行良好。

如何将此代码更改为客户端代码。



如何检查下面的C#代码以检查Jquery验证条件?

c#:代码



<前lang =cs> 如果(dstcourse.Tables [ 0 ]。Rows.Count == 0
{
ScriptManager.RegisterStartupScript( this this .GetType(), scr


('#dialog')。dialog({model:true,zIndex:20000});, true );
}
else if (dstModuleLevelInfo.Tables [ 0 ]。行[ 0 ] [ 0 ]。ToString() == - 1
{
ScriptManager.RegisterStartupScript( this this .GetType(), < span class =code-string> scr


Hi,
i need to change javascript alert to ajax modal popup alert.

how to convert alert message code to AjaxModalPopup code

In this line written in c#.same as javascript inside ajax popup open.


protected void Page_Load(object sender, EventArgs e)
{
   if (Request["CalledFrom"].ToString() != "ATL")
   {
   string js = null;
   js = "<script language='javascript'>alert('Following Courses have been approved    for    your Admin')</script>";
    Page.RegisterStartupScript("js", js);
   }
}

解决方案

Quote:

how to write the code without use ajaxtoolkit?

Simply, not possible.

You have to use that in order to implement Ajax ModalPopupExtender[^].


Hi,
In this code server side. code is working good.
how to change in this code to client side code.

How to check below C# code to check in Jquery validation condition?
c#: code

if (dstcourse.Tables[0].Rows.Count == 0)
 {
  ScriptManager.RegisterStartupScript(this, this.GetType(), "scr", "


('#dialog').dialog({model:true, zIndex:20000});", true); } else if (dstModuleLevelInfo.Tables[0].Rows[0][0].ToString() == "-1" ) { ScriptManager.RegisterStartupScript(this, this.GetType(), "scr", "


这篇关于如何将警报消息代码转换为AjaxModalPopup代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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