954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

message box

hai friends,

i cannot create the message box. the syntax i used is "MessageBox" . it gives the errror that namespace system.windows is not found. i searched with System.Windows i cannot found anything there.
so plz help

muthu
Newbie Poster
22 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

msgbox?

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

what messagebox? This is asp.net ... web pages.. what messagebox? message box is in windows forms projects not web pages.

Do you want to pop up a message to a user? you can use the javascript alert. Are you sure you understand the concept of asp.net? If not say so and we will try and explain it a bit

f1 fan
Posting Whiz in Training
279 posts since Jan 2006
Reputation Points: 26
Solved Threads: 11
 

f1_fan is right
u can use msgbox in asp.net coz it will run on the server and not on the client side.
u can use alert fuction in the javascript, coz its client-side.

web_developer
Junior Poster in Training
84 posts since Mar 2006
Reputation Points: 10
Solved Threads: 1
 

sorry, i mean "u can't use msgbox"

web_developer
Junior Poster in Training
84 posts since Mar 2006
Reputation Points: 10
Solved Threads: 1
 

ok, i manage it. thanks for ur reply

muthu
Newbie Poster
22 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

System.Windows.Forms.MessageBox.Show("");

senthil31185
Newbie Poster
2 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

System.Windows.Forms.MessageBox.Show("Voter is added to Voter List Sucessfully");

senthil31185
Newbie Poster
2 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

There is no message box in asp.net.
You can use this one.

Page pageCurr = HttpContext.Current.Handler as Page;
        if (pageCurr != null)
        {
            ScriptManager.RegisterStartupScript(pageCurr, pageCurr.GetType(), "aKey", "alert('" + "you message" + "');", true);
        }
kad1r
Newbie Poster
18 posts since Jun 2010
Reputation Points: 10
Solved Threads: 6
 

use this instead of msgbox

ClientScript.RegisterStartupScript(Me.GetType(), "OhNo", "alert('Your Message');", True)

plusplus
Posting Whiz in Training
207 posts since Jul 2007
Reputation Points: 10
Solved Threads: 16
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You