Click here to Skip to main content
15,920,111 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I know i am asking very stupid question but i have tried google when i didn't got from there so i posted this question here

This is the error i m getting. I am working on web application using C#.net 2010

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

This are all namespace i am using

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


C#
protected void btnsubmit_Click(object sender, EventArgs e)
   {
       MessageBox.Show("Test");
   }



Please help me
Thanks in advance
Posted
Updated 8-Dec-11 19:33pm
v3

Another interesting and useful alternative is jQuery message box.

Please read this CodeProject article: JQuery Message Box Plugin[^].

You can find some more: http://lmgtfy.com/?q=jquery+message+box[^].

Good luck,
—SA
 
Share this answer
 
Comments
thatraja 9-Dec-11 5:03am    
Ofcourse, 5!
Sergey Alexandrovich Kryukov 9-Dec-11 12:51pm    
Thank you, Raja.
--SA
 
Share this answer
 
Comments
Monjurul Habib 9-Dec-11 1:03am    
very nice link, my 5++
Sergey Alexandrovich Kryukov 9-Dec-11 1:11am    
Great, my 5.
--SA
Sergey Alexandrovich Kryukov 9-Dec-11 1:16am    
There is one more alternative, please see my answer.
--SA
There is no MessageBox class in ASP.NET. You can use alert function of JavaScript or the ConfirmButtonExtender/ModalPopupExtender of AjaxControlToolkit instead. Or create your own message box by using div which will you could popup using JQuery/JavaScript

Regards,
Eduard
 
Share this answer
 
v2
Comments
[no name] 8-Dec-11 23:44pm    
I don't think so. Maybe you used it in Windows application :)
thatraja 9-Dec-11 5:03am    
5!

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