iam new to dotnet ,iam not getting messagebox class in my system.(presently iam working with c#).please help me how to get it ...
thanks in advance..
9 2114
You need to use the System.Windows.Forms.MessageBox class... this obviously needs to be a windows application for you to be able to use it, because the MessageBox class needs a Windows interface to run on. MessageBoxes can not be displayed from a console application (as far as I know) or a web page, for example.
Hi jany]iam ,
There is none.. But you can always create a messagebox functionality program code in c#.net .
Best Regards,
Ruel
iam new to dotnet ,iam not getting messagebox class in my system.(presently iam working with c#).please help me how to get it ...
thanks in advance..
You can create messagebox using javascript in your code.
iam new to dotnet ,iam not getting messagebox class in my system.(presently iam working with c#).please help me how to get it ...
thanks in advance..
Here is a sample class that uses a message box. Note at the top that I have
using System.Windows.Forms; -
using System;
-
using System.Windows.Forms;
-
namespace WindowsApplication1
-
{
-
class Sample
-
{
-
private DateTime StartTime;
-
public Sample(DateTime dtStart)
-
{
-
if (dtStart > DateTime.Now)
-
MessageBox.Show("Invalid Time");
-
else
-
StartTime = dtStart;
-
}
-
}
-
}
-
Here is a sample class that uses a message box. Note at the top that I have
using System.Windows.Forms; -
using System;
-
using System.Windows.Forms;
-
namespace WindowsApplication1
-
{
-
class Sample
-
{
-
private DateTime StartTime;
-
public Sample(DateTime dtStart)
-
{
-
if (dtStart > DateTime.Now)
-
MessageBox.Show("Invalid Time");
-
else
-
StartTime = dtStart;
-
}
-
}
-
}
-
hi sammy, thanks for your response..
i know that message box class is available in windows app.but iam using a web application (C#),is there any chane to use message box class...
iam getting only "mbox" throrgh intellisence..but it is also not working properly...
Hi jany]iam ,
There is none.. But you can always create a messagebox functionality program code in c#.net .
Best Regards,
Ruel
hi aliasruel,
thanks for your reply
iam using c# olny,but is a web application,
then how to display the message box....
hi aliasruel,
thanks for your reply
iam using c# olny,but is a web application,
then how to display the message box....
you can use Javascript for message boxes......
you can use the alert() function.........
or you can use a new webpage as a messagebox......try to use javascript window.open() function.... in any button_click event you can have a pop-up window with the following code -
-
-
string popupScript = "<script language='javascript'>" +
-
"window.open('AddNewProduct.aspx', 'CustomPopUp', " +
-
"'width=850, height=650, menubar=no, resizable=no')" +
-
"</script>";
-
Page.RegisterStartupScript("PopupScript", popupScript);
-
but iam using a web application (C#)
This is why we have a posting guideline that specifically asks you to include that kind of information in your original post.
It would save us all time (except for me because I'm dumb and skim over it sometimes causing lots of confusion)
Hi Jany,
You dont need to create a new webpage as a messagebox. In c#.net i have created a functionality in web application that will perform the same behavior of a message box just like in windows form.
maybe you can email me to [ snip] then i will send the tool to you.
Best Regards,
Ruel
hi aliasruel,
thanks for your reply
iam using c# olny,but is a web application,
then how to display the message box....
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Dmitry Akselrod |
last post by:
Hello everyone,
I have a vb.net application that wraps the TCPListener object
in a class. The server connects to the local interface and establishes
itself on port 9900. It then polls for...
|
by: Dennis C. Drumm |
last post by:
This is a restatement of an earlier post that evidently wasn't clear. I am
building a custom MessageBox dialog that has, among other things, a few new
button options (yes to all, no to all, etc.)...
|
by: Saso Zagoranski |
last post by:
Hi!
I'm trying to make my own MessageBox... What I would like to know is, how
the MessageBox class is implemented?
I could have something like:
new MyMessageBox().ShowDialog();
but I would...
|
by: Hari |
last post by:
Guys please help me to solve this strange problem what Iam
getting as follows..
Trying to instantiate a global instance of a template
class as follows :-
when i build this code with debug and...
|
by: Sebastian Santacroce |
last post by:
Hello,
I'm trying get a message box to show useing messagebox.show
(...) and then checking what they chose. The only problem
is that when it pops up it is locking all other windows
until it the...
|
by: Rod Gill |
last post by:
Hi,
I have a form that when opened in the designer appears of the screen. The
form selector can't be dragged (or resized) and if I scroll right and down
to centralise it the form simply jumps...
|
by: Slawomir Nasiadka |
last post by:
Hi,
I'am new to this group so I would like to say "Hello" everyone
and here is my problem:
I'm writing a simple application (code is at the end of this message) witch
would list all mails...
|
by: Veerle |
last post by:
I have the following html:
<table cellpadding="0" cellspacing="0" width="850">
<tr>
<td>
<div id="messagebox">
<div class="Dialog">
<div class="DialogHeader">Fouten</div>
<div...
|
by: garyusenet |
last post by:
Hello everyone I hope you are having a good evening.
This evening I made a method that allows me to find the process id's of
running processes of a given 'friendly name' - using...
|
by: Clayton |
last post by:
Hi all,
I'm trying to develop a server that listens to incoming calls using
the asycnhronous methods BeginAccept / EndAccept. I start the server
(till this point it is ok) and few seconds later...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |