Sunday, May 19, 2024
Homepage · c#
 Popular · Latest · Hot · Upcoming
81
rated 0 times [  83] [ 2]  / answers: 1 / hits: 22346  / 11 Years ago, mon, november 18, 2013, 12:00:00

I am working on asp.net web application.
I have one UpdatePanel and there is table inside table which has data in some TextBoxes.



I have one save button too inside this UpdatePanel
So I want to save this data into Database, when I click Save Button.



This is working fine till now.



But I want to show alert message to User that information saved successfully. I'm using javascript for this purpose, But Javascript is not working.
so is this possible to achieve the desired functionality using javascript, if yes then please guide me Or if there is any other alternative method except this please let me know.



Thanks,
Vivek


More From » c#

 Answers
14

If you have update panel use ScriptManager.RegisterClientScriptBlock as below



ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), alert, alert('Member Registered Sucessfully');, true)


Remember that you can't use Response.Write during an asynchronous postback.



It would be good if you have posted your code here.


[#74229] Saturday, November 16, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
roberts

Total Points: 212
Total Questions: 101
Total Answers: 101

Location: Philippines
Member since Thu, Apr 14, 2022
2 Years ago
;