使用ScriptManager.RegisterStartupScript(this,GetType()," showAlert"," alert('Email address saved。');",true);要在asp.net网页上显示弹出消息,菜单项会垂直显示... [英] while using ScriptManager.RegisterStartupScript(this, GetType(), "showAlert", "alert('Email address saved.');", true); to display pop up message on asp.net webpage, the menu items get vertically...

查看:161
本文介绍了使用ScriptManager.RegisterStartupScript(this,GetType()," showAlert"," alert('Email address saved。');",true);要在asp.net网页上显示弹出消息,菜单项会垂直显示...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已尝试过所有组合:

//MessageBox.Show(已保存电子邮件地址。);

ScriptManager.RegisterStartupScript(this,GetType() ,showAlert,alert('电子邮件地址已保存。');,true);

//ScriptManager.RegisterStartupScript(this,GetType(),displayalertmessage,Showalert(); ,true);

//ScriptManager.RegisterStartupScript(这,this.GetType(),showalert,alert('保存电子邮件地址。');,true);

//this.Page.ClientScript.RegisterStartupScript(this.GetType(),Guid.NewGuid()。ToString(),alert('保存电子邮件地址。'); __ doPostBack('__ Page','EmptyPostback ');,true);

//Page.ClientScript.RegisterStartupScript(this.GetType(),myalert,alert('Email address saved。');,true);

i have tried all of the combinations:
//MessageBox.Show("Email address saved.");
ScriptManager.RegisterStartupScript(this, GetType(), "showAlert", "alert('Email address saved.');", true);
//ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);
//ScriptManager.RegisterStartupScript(this, this.GetType(), "showalert", "alert('Email address saved.');", true);
//this.Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString() , "alert('Email address saved.');__doPostBack('__Page', 'EmptyPostback');", true);
//Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Email address saved.');", true);

推荐答案

this.ClientScript.RegisterClientScriptBlock(this.GetType(),this.ClientID +_ JS_Error,alert('Email saved! '));



试试这样
this.ClientScript.RegisterClientScriptBlock(this.GetType(), this.ClientID + "_JS_Error", "alert('Email saved!')");

Try like this


这篇关于使用ScriptManager.RegisterStartupScript(this,GetType()," showAlert"," alert('Email address saved。');",true);要在asp.net网页上显示弹出消息,菜单项会垂直显示...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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