M Taher
M Taher

Reputation: 130

script manager not working in asp.net

I`m trying to show a message to user after the form submitted and want to return the id that i got from db inside the message like bellow

int reqid = come from database;

string scrp = "<script>alert('your request submitted with number " + reqid.ToString() + " successfully !');'</script>";

ScriptManager.RegisterStartupScript(this , GetType(), "alert", scrp , true);

I don`t know why the script not working .

I`m using ajax features in my page .

Upvotes: 0

Views: 1921

Answers (1)

Tummala Krishna Kishore
Tummala Krishna Kishore

Reputation: 8271

Remove <script> Tags and Plz try the below code

int reqid = come from database;

string scrp = "alert('your request submitted with number " + reqid.ToString() + " successfully !');";

ScriptManager.RegisterStartupScript(this , this.GetType(), "alert", scrp , true);

Upvotes: 1

Related Questions