message box for .net web application

B

bev

I have been developing a .net web application and have
come across a road block within my expertise. .net is
the first web language I have used. I have found that I
need java script to do some of the functions I would like
to perform. so far I have been able to work around most
functions however, my user would like a message box to
appear on screen when the user's browser is netscape. I
am able to recognize netscape, but can not display a
message box. A coworker informed me that I needed java
in order to display a message box in a web application.
Can anybody help me with the java(both code and where it
should reside) necessary to display the message box?
 
P

Phil

I create a seperate Javascript file

the javascript is simply

function popUpMessage()

{

confirm('Your about to map a site ok?');

}

I then call this by adding the javascript to an attribute of the button on
my page load.

private void Page_Load(object sender, System.EventArgs e)

{

Button1.Attributes.Add("onClick", "popUpMessage();");

// Put user code to initialize the page here

}



Hope that helps.



regards. Phil.
 
Y

Yan-Hong Huang[MSFT]

Hello Bev,

Phil is right. You could use Javascript to launch a message box in client side. You could also refer to window.alert method to
do so.

Just pay attention that we can't use MessageBox to show dialog in code behind file. Since this kind of code is running on
server side, so the messagebox will be shown in the desktop of server, which blocks the web application.

Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "bev" <[email protected]>
!Sender: "bev" <[email protected]>
!Subject: message box for .net web application
!Date: Tue, 15 Jul 2003 05:38:07 -0700
!Lines: 12
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNKzfFVREFnhS2ITAWBt7+jw5enxA==
!Newsgroups: microsoft.public.dotnet.general
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:101185
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.public.dotnet.general
!
!I have been developing a .net web application and have
!come across a road block within my expertise. .net is
!the first web language I have used. I have found that I
!need java script to do some of the functions I would like
!to perform. so far I have been able to work around most
!functions however, my user would like a message box to
!appear on screen when the user's browser is netscape. I
!am able to recognize netscape, but can not display a
!message box. A coworker informed me that I needed java
!in order to display a message box in a web application.
!Can anybody help me with the java(both code and where it
!should reside) necessary to display the message box?
!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top