Home > Forums > Regular Expressions >


The name 'MessageBox' does not exist in the current context

Posted by Suneel161 under Regular Expressions on 2/8/2010 2:48:54 AM | Views : 22328 | Status : [Member] | Replies : 4
hiiii
in my program im using massagebox...the following error occured plz help me how ro solve this error
"The name 'MessageBox' does not exist in the current context"




Responses

Posted by: Nishithraj on: 2/11/2010 [Member] Bronze
Check this link for more info

http://www.developerfusion.com/code/4700/a-simple-aspnet-messagebox-class/ 


Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Sagarp on: 2/8/2010 [Member] Bronze
Check u have add this System.Windows.Forms namespace .u must add .

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Bubbly on: 2/8/2010 [Member] Bronze
Hello,

Just add reference to System.Windows.Forms namespace

++
Thanks & Regards,
Deepika

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Vuyiswamb on: 2/8/2010 [Member] [MVP] [Administrator] NotApplicable
Is this a Win Application or Web ? Because in ASP.NET there is no Messagebox. we use JavaScript to show them. If you want to use a message box in asp.net which i don't recommend is to import the System.Windows.Forms namespace

and add it in your Using and after that you can use the Message-box.

Thank you for Posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response