C# 我如何更改msgbox标题;页面位于http://.... 上面写着:“什么;

C# 我如何更改msgbox标题;页面位于http://.... 上面写着:“什么;,c#,asp.net,C#,Asp.net,我正在asp.net中通过以下代码打开msgbox if (ds.Tables[0].Rows[0][12].ToString() == "0" ) Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "alert('This ID is not yet approved to create a case. ');", true); else if(ds.Tables[0].Rows[0][12].ToStri

我正在asp.net中通过以下代码打开msgbox

if (ds.Tables[0].Rows[0][12].ToString() == "0" )
   Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "alert('This ID is not yet approved to create a case. ');", true);
else if(ds.Tables[0].Rows[0][12].ToString() == "2")
   Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "alert('Your ID is rejected to create a case. ');", true);
else
   Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "alert('Please enter a valid ID.');", true);
当它在mozilla浏览器上运行时,消息框标题显示
页面http://.... 上面写着:

我想更改此标题,并将我的自定义标题显示在http://.... 上面写着:


任何打开的文件请尽快帮助我。

您不能更改此标题

警报框由浏览器生成,标题不是可以通过javascript控制的内容

最好是用javascript创建自己的警报框(例如使用jQueryUI)


请参阅。

查看或。

使用自定义警报消息框更改标题,否则无法更改标题

有关更多详细信息,请查看此链接

你可以试试这个

MsgBox("Hi", MsgBoxStyle.MsgBoxSetForeground, Title)

它将显示网页的标题。例如,如果您的网页标题为“我的主页”,则按摩盒的标题将为“我的主页”

我使用的是JavaScript jquery。。代码是Page.ClientScript.RegisterStartupScript后面的代码(this.GetType(),“Window”,“callAlert();”,true);在ascx页面上,我已经编写了$(document).ready(function(){$('#ImageButton1')。单击(function(){jAlert('Please enter a valid.','Case Entry');});脚本,但问题是,当页面完全加载时,警报框会自动被禁用。任何人都可以帮助我。。。。如何停止自动回邮