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. Page.ClientScript.RegisterStartupScript is not working

Page.ClientScript.RegisterStartupScript is not working

Scheduled Pinned Locked Moved ASP.NET
csharphelpjavascriptasp-nettools
3 Posts 3 Posters 0 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.
  • I Offline
    I Offline
    imranafsari
    wrote on last edited by
    #1

    Hi all, I am using C# , asp.net2.0 On a button click I have to generate a report in new window I am using following code but It is neither giving error not redirecting the page to destination. Please help string Script= "<script type='text/javascript' language ='javascript' >"; Script+= "window.open('PasswordRecovery.aspx',null,'resizeable=no,scrollbars=no,addressbar=no,toolbar=no,width=300,Height=250');"; Script+= "</script>"; Type csType = this.GetType(); Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script); imran khan

    A B 2 Replies Last reply
    0
    • I imranafsari

      Hi all, I am using C# , asp.net2.0 On a button click I have to generate a report in new window I am using following code but It is neither giving error not redirecting the page to destination. Please help string Script= "<script type='text/javascript' language ='javascript' >"; Script+= "window.open('PasswordRecovery.aspx',null,'resizeable=no,scrollbars=no,addressbar=no,toolbar=no,width=300,Height=250');"; Script+= "</script>"; Type csType = this.GetType(); Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script); imran khan

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      did you used Ajax in this page ? if yes then use ScriptManager.RegisterClientScriptBlock() insted of

      imranafsari wrote:

      Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script);

      cheers, Abhijit

      1 Reply Last reply
      0
      • I imranafsari

        Hi all, I am using C# , asp.net2.0 On a button click I have to generate a report in new window I am using following code but It is neither giving error not redirecting the page to destination. Please help string Script= "<script type='text/javascript' language ='javascript' >"; Script+= "window.open('PasswordRecovery.aspx',null,'resizeable=no,scrollbars=no,addressbar=no,toolbar=no,width=300,Height=250');"; Script+= "</script>"; Type csType = this.GetType(); Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script); imran khan

        B Offline
        B Offline
        Brij
        wrote on last edited by
        #3

        Please check whethet you have used Ajax in that page or not??

        Cheers!! Brij

        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