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
  1. Home
  2. Web Development
  3. ASP.NET
  4. WebUserControl, UpadtePanel And JavaScript Problem

WebUserControl, UpadtePanel And JavaScript Problem

Scheduled Pinned Locked Moved ASP.NET
helpjavascript
2 Posts 2 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.
  • J Offline
    J Offline
    jitendrafaye
    wrote on last edited by
    #1

    I have one WebUserControl, in that in have placed one UpdatePanel after that i have placed one Button. Finally I have placed that UserControl on my new WebForm. structure - WebUserControl -> Updatepanel ->Button and New WebForm->WebUserContol Now I want to show JavaScript alert window when i m pressing Button from code behind. fot that i have written- ScriptManager.RegisterStartupScript(this,typeof(this.getType()) ,"ScriptKey","alert('HI')", true); But it is not working.Plz help me . Thank's in advance.

    D 1 Reply Last reply
    0
    • J jitendrafaye

      I have one WebUserControl, in that in have placed one UpdatePanel after that i have placed one Button. Finally I have placed that UserControl on my new WebForm. structure - WebUserControl -> Updatepanel ->Button and New WebForm->WebUserContol Now I want to show JavaScript alert window when i m pressing Button from code behind. fot that i have written- ScriptManager.RegisterStartupScript(this,typeof(this.getType()) ,"ScriptKey","alert('HI')", true); But it is not working.Plz help me . Thank's in advance.

      D Offline
      D Offline
      david vermeulen
      wrote on last edited by
      #2

      Not sure if you have figured it out yet, but I think the problem is where you register your startup script. It should point to the page (page where the control is loaded) and not to the control itself. You can try : ScriptManager.RegisterStartupScript(this.Page,typeof(this.Page.getType()) ,"ScriptKey","alert('HI')", true); Hope this helps.

      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