Maeesage boxes
in my web application i didn't get message box options while using it in a try catch block
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ramesh natarajan47 reputationPosted Jan 23, 2012, 11:09 PM EST
Before that Right-Click on the Solution and Add System.Window.Forms Dll Reference.
protected void Page_Load(object sender, EventArgs e)
{
try
{
System.Windows.Forms.MessageBox.Show("hi");
int a = 0;
int b = 0;
int c = a / b;
}
catch(Exception ex)
{
string text = ex.ToString();
System.Windows.Forms.MessageBox.Show(text);
}
}
Thanks
Ramesh Natarajan
Krishna GaradRank #191 · 12.8K reputationPosted Jan 23, 2012, 11:10 PM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 24, 2012, 12:09 AM EST
agree with krishna.
this is not good idea to show message box using System.Windows name space but use use java script.
kindly share more detail of ur work why we required it when it required?
hope this help.
ramesh natarajan47 reputationPosted Jan 24, 2012, 12:21 AM EST
I know that Javascript will help!
but I am not sure what anil expecting!