| | |
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
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos application asp asp.net bc30451 bottomasp.net browser button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose feedback fill flash form formatdecimal forms formview gridview homeedition hosting iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols parent radio ratings registration reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking typeof unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers






am gettin into trouble 