1

我在我的应用程序中使用 toolscriptmanager。我使用 javascript 警报消息如下:

  1. StringBuilder s = new StringBuilder(); s.Append("<script language='javascript'>"); s.Append("alert('You Are Not Authorized To View This Page')"); s.Append("</script>"); RegisterStartupScript("You Are Not Authorized To View This Page", s.ToString());

  2. ClientScript.RegisterClientScriptBlock(this.GetType(), "Success", "<script type='text/javascript'>alert('Your are not authorized to view this page!');

  3. Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please enter a valid Order ID')");

  4. Console.Write("<script>alert('Invalid USer')</script>");

还使用了 scriptmanager.registerclientscript 但没有任何效果。我没有使用更新面板,而是使用 toolscriptmanager。

错误在哪里?

4

1 回答 1

0

this.ClientScript.RegisterStartupScript(this.GetType(), "startUpScriptBlock", "alert('TESZT')", true);

于 2012-08-14T07:34:33.257 回答