| | |
MessageBox in C#
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Feb 2009
Posts: 12
Reputation:
Solved Threads: 1
Hi
You use
You use
ASP.NET Syntax (Toggle Plain Text)
MessageBox.Show("This is a message");
/Regards
Frank
Frank
•
•
Join Date: Feb 2009
Posts: 12
Reputation:
Solved Threads: 1
I guess the Call is done within a Form?
The MessageBox is included in the namespace System.Windows.Forms
Do you have this in your using at the top?
Or have you tried to write
The MessageBox is included in the namespace System.Windows.Forms
Do you have this in your using at the top?
Or have you tried to write
ASP.NET Syntax (Toggle Plain Text)
System.Windows.Forms.MessageBox.Show("This is a message");
/Regards
Frank
Frank
•
•
Join Date: Dec 2008
Posts: 104
Reputation:
Solved Threads: 18
MessageBox is only available in Window Applicaitons. In ASP.NET, you cannot use the MessageBox class or MsgBox function like you can in a Window Applicaitons, but you can emulate this functionality by streaming out a javascript alert instruction like this:
ASP.NET Syntax (Toggle Plain Text)
Response.Write(@"<script language='javascript'>alert('This is my Message')</script>");
•
•
Join Date: Dec 2008
Posts: 30
Reputation:
Solved Threads: 1
Okai..
This is my sample code for Palindrome checking.
Got a string in textbox 1.
This code is done in Asp.Net webapplication with VB code behind.
Can u say how to use message box with C# code behind
This is my sample code for Palindrome checking.
Got a string in textbox 1.
ASP.NET Syntax (Toggle Plain Text)
TextBox2.Text = StrReverse(TextBox1.Text) If TextBox1.Text = TextBox2.Text Then MsgBox("String is palindrome", MsgBoxStyle.OkOnly) Else MsgBox("Not a palindrome", MsgBoxStyle.OkOnly) End If
This code is done in Asp.Net webapplication with VB code behind.
Can u say how to use message box with C# code behind
Last edited by peter_budo; Feb 19th, 2009 at 4:10 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- Pass data to MessageBox (VB.NET)
- Calling MessageBox in Borland C++Builder (C++)
- Messagebox (ASP.NET)
- MessageBox (C++)
- MessageBox::Show problem (C++)
Other Threads in the ASP.NET Forum
- Previous Thread: Printing problem with crystalreportviewer
- Next Thread: Enable and disable checkbox in datagrid at runtime
Views: 4039 | Replies: 15
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 activexcontrol advice ajax anathor asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype courier css database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdown dropdownmenu edit expose feedback flash flv folder form formatdecimal forms formview google grid gridview homeedition hosting identity iframe iis index javascript jquery list menu migration mono mssql multistepregistration nameisnotdeclared object objects order problem ratings refer rotatepage save search security serializesmo.table session silverlight smartcard sql sqlserver2005 suse textbox tracking typeof unauthorized update validation vb vb.net video view virtualdirectory vista visual-studio visualstudio web webarchitecture webdevelopemnt xml youareanotmemberofthedebuggerusers






am gettin into trouble 