Click here to Skip to main content
16,014,392 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Anyone can help me how can I show message in ASP.NET C#.

Thank you.
Posted
Comments
[no name] 6-Apr-14 20:56pm    
Sure.... first thing to do would be to conduct just a little bit of research.... http://www.codeproject.com/search.aspx?q=alert+asp.net&x=0&y=0&sbo=qa
Mr_Programmer31 6-Apr-14 21:12pm    
Thank you., :)

You can use...
C#
Response.Write("Your Message Here");

Else use JavaScript Alert Box like...
JavaScript
alert("Your Message Here");
 
Share this answer
 
Comments
King Fisher 7-Apr-14 0:21am    
;)
Its always better to have alert messages on the javascript side.
For e.g.
void myMethod()
{
   //Do Something
   alert("My Message");
}
 
Share this answer
 
Hi,

ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "message", "alert('Your message')", true);

Thank you

Best Regards,
Nagaraj.N.M.
 
Share this answer
 
Hi,
Use this,
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('This is an alert');", true);
 
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