0

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 .

1 Answer 1

1

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);
Sign up to request clarification or add additional context in comments.

1 Comment

hahahaha , thanks a lot man , i almost got crazy because of this .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.