message box for .net web application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bev

    #1

    message box for .net web application

    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?
  • Phil

    #2
    Re: message box for .net web application

    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(objec t sender, System.EventArg s e)

    {

    Button1.Attribu tes.Add("onClic k", "popUpMessage() ;");

    // Put user code to initialize the page here

    }



    Hope that helps.



    regards. Phil.





    "bev" <bkuykendall@dl lr.state.md.us> wrote in message
    news:096e01c34a cd$f1550d60$a50 1280a@phx.gbl.. .[color=blue]
    > 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?[/color]


    Comment

    • Yan-Hong Huang[MSFT]

      #3
      RE: message box for .net web application

      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" <bkuykendall@dl lr.state.md.us>
      !Sender: "bev" <bkuykendall@dl lr.state.md.us>
      !Subject: message box for .net web application
      !Date: Tue, 15 Jul 2003 05:38:07 -0700
      !Lines: 12
      !Message-ID: <096e01c34acd$f 1550d60$a501280 a@phx.gbl>
      !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: AcNKzfFVREFnhS2 ITAWBt7+jw5enxA ==
      !Newsgroups: microsoft.publi c.dotnet.genera l
      !Path: cpmsftngxa06.ph x.gbl
      !Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:101185
      !NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
      !X-Tomcat-NG: microsoft.publi c.dotnet.genera l
      !
      !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?
      !


      Comment

      Working...