Message Box In VB .net

Hi all
can any 1 plz tell me how to show message box in VB .net (Web Application)
I am new to this technology .
Thx in advance
Vipin

Comments

  • : Hi all
    : can any 1 plz tell me how to show message box in VB .net (Web Application)
    : I am new to this technology .
    : Thx in advance
    : Vipin
    :

    The Syntax you would use to display a message box is MsgBox(Prompt, Buttons,Title)
  • : : Hi all
    : : can any 1 plz tell me how to show message box in VB .net (Web Application)
    : : I am new to this technology .
    : : Thx in advance
    : : Vipin
    : :
    :
    : The Syntax you would use to display a message box is MsgBox(Prompt, Buttons,Title)
    :
    This is not working in web based application
    I think there is some other trick
    Vipin

  • : : : Hi all
    : : : can any 1 plz tell me how to show message box in VB .net (Web Application)
    : : : I am new to this technology .
    : : : Thx in advance
    : : : Vipin
    : : :
    : :
    : : The Syntax you would use to display a message box is MsgBox(Prompt, Buttons,Title)
    : :
    : This is not working in web based application
    : I think there is some other trick
    : Vipin
    :
    :

    Windows Forms or any win32 API GUI element will not work under web forms. The reason is because the actual platform for a web application is a web browser.

    Now if you are set on using dialogs then you must use client-side scripting ...

    Below uses asp.ent code to display client-side script ...

    Response.Write("")
    Response.Write("")
    Response.Write("")

    A better technique is to use a place holder where u want to place the script ...

    In the .aspx page

    ...

    ...

    Then add a script tag at that location ....

    In the .aspx.vb file

    Protected WithEvents genScript As PlaceHolder

    ...
    Dim ctrlScript As New HtmlGenericControl
    ctrlScript.TagName = "script"
    ctrlScript.Attributes.Add("language", "javascript")

    ctrlScript.InnerHTML &= "<!--" & vbCrLf
    ctrlScript.InnerHTML &= "alert('Some Message');" & vbCrLf
    ctrlScript.InnerHTML &= "//->" & vbCrLf

    genScript.Controls.Add(ctrlScript)

    Hope this sorta helps.






  • : : : : Hi all
    : : : : can any 1 plz tell me how to show message box in VB .net (Web Application)
    : : : : I am new to this technology .
    : : : : Thx in advance
    : : : : Vipin
    : : : :
    : : :
    : : : The Syntax you would use to display a message box is MsgBox(Prompt, Buttons,Title)
    : : :
    : : This is not working in web based application
    : : I think there is some other trick
    : : Vipin
    : :
    : :
    :
    : Windows Forms or any win32 API GUI element will not work under web forms. The reason is because the actual platform for a web application is a web browser.
    :
    : Now if you are set on using dialogs then you must use client-side scripting ...
    :
    : Below uses asp.ent code to display client-side script ...
    :
    : Response.Write("")
    : Response.Write("")
    : Response.Write("")
    :
    : A better technique is to use a place holder where u want to place the script ...
    :
    : In the .aspx page
    :
    : ...
    :
    : ...
    :
    : Then add a script tag at that location ....
    :
    : In the .aspx.vb file
    :
    : Protected WithEvents genScript As PlaceHolder
    :
    : ...
    : Dim ctrlScript As New HtmlGenericControl
    : ctrlScript.TagName = "script"
    : ctrlScript.Attributes.Add("language", "javascript")
    :
    : ctrlScript.InnerHTML &= "<!--" & vbCrLf
    : ctrlScript.InnerHTML &= "alert('Some Message');" & vbCrLf
    : ctrlScript.InnerHTML &= "//->" & vbCrLf
    :
    : genScript.Controls.Add(ctrlScript)
    :
    : Hope this sorta helps.
    :
    :
    :
    :
    :
    :

    You can use the JavaScript alert function, this is more or less a message box as I understand, but I didn't get it working myself...

    <% Response.Write("<script>alert("Your Message Here");") %>

    Should do the trick. Hope this helms

    Andy Kimbrey - Agile-IT

    mailto:andrew.kimbrey@agile-it.net

    ICQ:78749520

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories