Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

After submitting the form It should display the message as " Data saved " The message box will appear for 10 sec. after it will closed.

Help pl

Regards
Praveen
Posted

You can't close a standard MessageBox from outside the box - well, you can but it gets very complicated.

The easiest way to do this, is to create your own MessageBox class, and handle a timer there.
 
Share this answer
 
Comments
Reiss 15-Aug-11 7:02am    
Also, you should provide a pump into your custom messagebox class to instruct it to close - a timer is bad design flaw - what happens if the data isn't saved (e.g. an exception is thrown somewhere), the user thinks the data has been saved but hasn't
OriginalGriff 15-Aug-11 7:05am    
Good thought - I should have added that myself.
Philippe Mori 15-Aug-11 18:45pm    
The question was asked for ASP.NET. In that case, I don't think it would be possible to uses a standard message box...
Sergey Alexandrovich Kryukov 15-Aug-11 22:53pm    
The whole idea of OP is wrong; please see my solution.
--SA
Wrong idea! Why 10 seconds? How you want to guarantee that a situation changes when 10 seconds pass? You need to show something when processing of the data is complete. Implementation of this — correct — behavior is straightforward.

—SA
 
Share this answer
 

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