Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Javascript Messagebox

Javascript Messagebox

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netquestion
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    macca24
    wrote on last edited by
    #1

    I have some VB.net code in an asp.net page from which I want to automatically kick off a messagebox, someone told me that a Javascript message box is the best way. My code is: If Var1 = Var2 Then 'Kick off MessageBox Automatically I want the message box to have an OK button and to display the message "Please Click OK to proceed". Anyone any code for the Javascript messagebox and any vb.net code for kicking off the messagebox? Thanks. macca

    C S 2 Replies Last reply
    0
    • M macca24

      I have some VB.net code in an asp.net page from which I want to automatically kick off a messagebox, someone told me that a Javascript message box is the best way. My code is: If Var1 = Var2 Then 'Kick off MessageBox Automatically I want the message box to have an OK button and to display the message "Please Click OK to proceed". Anyone any code for the Javascript messagebox and any vb.net code for kicking off the messagebox? Thanks. macca

      C Offline
      C Offline
      CoolAmir
      wrote on last edited by
      #2

      I'm not approving ur algorithm but u can use: this.RegisterClientScriptBlock("NameOfScirpt", StringVar); to generate some JS dynamically. StringVar contains a JS alert() function.

      1 Reply Last reply
      0
      • M macca24

        I have some VB.net code in an asp.net page from which I want to automatically kick off a messagebox, someone told me that a Javascript message box is the best way. My code is: If Var1 = Var2 Then 'Kick off MessageBox Automatically I want the message box to have an OK button and to display the message "Please Click OK to proceed". Anyone any code for the Javascript messagebox and any vb.net code for kicking off the messagebox? Thanks. macca

        S Offline
        S Offline
        sarvesh189
        wrote on last edited by
        #3

        coding in vb.net if Var1=Var2 then RegisterClientScriptBlock("",alert('Please click ok to proceed');") end if yr problem is not clear though i have sent a soln. which will invoke the alert box. there is a-- confirm('please click ok to proceed') -- with the button ok and cancel if ok is clicked then the code after it will be executed otherwise not. sarvesh

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups