Javascript 重定向前的警报在asp中显示带有消息的值

Javascript 重定向前的警报在asp中显示带有消息的值,javascript,asp.net,.net,visual-studio,Javascript,Asp.net,.net,Visual Studio,我试图在消息中显示一个字符串,但出现了一个错误。 str1是从表中检索的值 代码是 ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Welcome'); window.location='" + Request.ApplicationPath + "#';", true); 但我想显示如下 ScriptManager.RegisterStartupScript(this

我试图在消息中显示一个字符串,但出现了一个错误。 str1是从表中检索的值

代码是

ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Welcome'); window.location='" +
         Request.ApplicationPath + "#';", true);
但我想显示如下

ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Welcome '" + tbEmail.Text + "''); window.location='" +
         Request.ApplicationPath + "#';", true);

我只是个初学者,非常感谢您的帮助,谢谢您什么错误?也发布错误。您错过了一个
。在
之后有一个额外的
…使用此
“警报('Welcome'”+tbEmail.Text+“)”;
显示此红色下划线