Response.Write("<script>alert(\'错误:123\')</script>");Response.Write("<script>alert(\'" + Session["RCSystemInnateSoft_Err"].ToString() + "\')</script>");
问题是我用第一个弹出框时可以用,就是直接赋值可以显示!而第二个语句的弹出框中的Session[RCSystemInnateSoft_Err].ToString()是保存出错时信息,可不能弹出显示!谢谢了!
问题是我用第一个弹出框时可以用,就是直接赋值可以显示!而第二个语句的弹出框中的Session[RCSystemInnateSoft_Err].ToString()是保存出错时信息,可不能弹出显示!谢谢了!
alert(\'" + Session["RCSystemInnateSoft_Err"].ToString() + "\')</script>");
Response.Write("<script>alert(\'错误:123\')</script>");
Response.Flush();
Response.Write("<script>alert(\'" + Session["RCSystemInnateSoft_Err"].ToString() + "\')</script>");
Response.Write("<script>alert(\'错误:123\')</script>");
Response.Flush();
Response.Write("<script>alert(\'哦ok:123\')</script>");
如果能弹出,那就是Response.Write("<script>alert(\'" + Session["RCSystemInnateSoft_Err"].ToString() + "\')</script>");语句不对,用下面的试试
Response.Write("<script>alert('" + Session["RCSystemInnateSoft_Err"].ToString() + "')</script>");
Page.RegisterClientScriptBlock("key",strScript);
{
Response.Write("<script>alert('" + Session["RCSystemInnateSoft_Err"].ToString() + "')</script>");
}
string strScript=@"<script>alert('"+Convert.ToString(Session["RCSystemInnateSoft_Err"])+"')</script>";
Page.RegisterClientScriptBlock("key",strScript);
另外结贴是自己结呢