Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
how to display messages in asp.net using C# language like MessageBox.show(""); in windows applications?
Posted 11-Jul-12 19:23pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

There is the JavaScript function alert, but this is pretty ugly. Please see:
http://www.w3schools.com/js/js_popup.asp[^].
 
The best modal functionality without ugly pop-ups close to the message box is probably the jQuery modal box. Please see:
http://archive.plugins.jquery.com/project/modalBox[^].
 
There is a number of different alternative implementation of similar modal boxes, such as:
http://web.enavu.com/tutorials/top-10-jquery-modal-box-plugins/[^],
http://www.jquery4u.com/windows/14-jquery-modal-dialog-boxes/[^],
http://coderplus.com/2009/11/jquery-modal-boxes-to-improve-your-ui/[^],
http://www.webgurusdesignblog.com/2009/02/10-best-modal-boxes-for-web-design-projects/[^].

 
If you are not well familiar with jQuery yet, I would advise to learn some jQuery if you want advanced JavaScript UI with good feature and maintainability. You can start here:
http://docs.jquery.com/Tutorials:How_jQuery_Works[^],
http://docs.jquery.com/Tutorials[^],
http://docs.jquery.com/Main_Page[^].
 
—SA
  Permalink  
Comments
Prasad_Kulkarni at 12-Jul-12 0:40am
   
Many alternatives.
Good collection, +5!
Sergey Alexandrovich Kryukov at 12-Jul-12 0:49am
   
Thank you, Prasad.
--SA
vangapallynaveen at 12-Jul-12 0:59am
   
Good Links..........
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,
There is nothing like Message.Show() in asp.net. If you want to show the messages then you can use javascript as follows:
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "MyScript", "alert('Saved Successfully !!');", true);
For more details you can view this[^].
 
All the best.
--Amit
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

protected void Btn_Click(object sender, EventArgs e)
    {
        ScriptManager.RegisterStartupScript(
            this,
            this.GetType(),
            "MessageBox",
            "alert('this is message Box');",
            true);
    }
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

I think this is exactly what you need: A Windows Form like MessageBox for ASP.NET Website[^]
 
Let me know if it helped.
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 12 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100