How can I display a messagebox in ASP.NET?

前端 未结 13 2148
死守一世寂寞
死守一世寂寞 2020-11-30 11:30

I want to show a message box on the successful save of any item. I googled it and tried different solutions, but none of them worked. Here is the code I am using:

         


        
13条回答
  •  无人及你
    2020-11-30 12:04

    @freelancer If you are using ScriptManager then try this code for message..

    string script = "alert(\"Hello!\");";
    ScriptManager.RegisterStartupScript(this, GetType(), 
                          "ServerControlScript", script, true);
    

提交回复
热议问题