对话框弹出错误提示
public void ErrorTip(string strTip, string strMessage)
{
string strScript = "<script language = 'javascript' type='text/javascript'>alert(\"" + strTip + strMessage.Replace("\r", " ").Replace("\n", "").Replace("'","‘") + "\");</script>";
Page.RegisterStartupScript("Messages", strScript);
}
//Replace("'","‘") 将英文的' 换成中文的‘ 否则会脚本报错.
public void ErrorTip(string strMessage)
{
string strTipErrorScript = @"alert('系统提示:" + strMessage + "');";
Page.ClientScript.RegisterStartupScript(this.GetType(), "TipErrorScript", strTipErrorScript, true);
}
public void SystemTip(string strTip)
{
string strTipScript = @"alert('" + strTip + "');";
Page.ClientScript.RegisterStartupScript(this.GetType(), "TipScript", strTipScript, true);
}
{
string strScript = "<script language = 'javascript' type='text/javascript'>alert(\"" + strTip + strMessage.Replace("\r", " ").Replace("\n", "").Replace("'","‘") + "\");</script>";
Page.RegisterStartupScript("Messages", strScript);
}
//Replace("'","‘") 将英文的' 换成中文的‘ 否则会脚本报错.
public void ErrorTip(string strMessage)
{
string strTipErrorScript = @"alert('系统提示:" + strMessage + "');";
Page.ClientScript.RegisterStartupScript(this.GetType(), "TipErrorScript", strTipErrorScript, true);
}
public void SystemTip(string strTip)
{
string strTipScript = @"alert('" + strTip + "');";
Page.ClientScript.RegisterStartupScript(this.GetType(), "TipScript", strTipScript, true);
}