Tips: Clearing Old Msg – ASP.NET

Small code but it’s useful in many situations.
Hope, you may find it useful.

btnSave.Attributes.Add("onclick", "document.all." & txtOperationMessages.ClientID & ".innerText = '';"

Note ~
- btnSave is the name of Button that the user suppose to click for clearing old message.
- txtOperationMessages is the name of control that shows message.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>