Click here to Skip to main content
15,943,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to create a pop up window on button click to notify user to smth??
for example.. when user will click the save button.. i want a pop window to notify him that the changes were saved
Jibesh 20-Dec-12 7:04am    
windows form? or Web?

If windows form:
private void button1_Click(object sender, EventArgs e)
        Messagebox.Show("Changes saved");

if webform:

<!DOCTYPE html>
 function myFunction()
 alert("Changes saved!");

 <input type="button" onclick="myFunction()" value="Show alert box">

Share this answer
Use Following Code :

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "alert('Data Saved Successfully!!')", true);
Share this answer
For that you can use AJAX Modal Popup Control (I hope you are aware about this) :
Dynamic AJAX Modal Popup[^]
Modal Popup Overlay[^]
Share this answer
David Goebet 20-Dec-12 7:02am    
What about a normal MsgBox (MessageBox) ?
[no name] 20-Dec-12 7:04am    
Yes you can use it as well..
Ankur\m/ 20-Dec-12 7:30am    
Why ajax popup box? Just an alert will do the job.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900