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. Error with Button onClick

Error with Button onClick

Scheduled Pinned Locked Moved ASP.NET
helpdatabase
2 Posts 2 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.
  • U Offline
    U Offline
    User 3672257
    wrote on last edited by
    #1

    I am trying to navigate to another page with the help of a button. I used onClick="window.location='http://localhost/adbintranet/index/GoldDriveCustInfo.aspx'" When i compile i get an error that reads: Compiler Error Message: BC30456: 'window' is not a member of 'ASP.GoldDrive_aspx'. I have tried different onClick methods but still get the BC30456. Please help.

    M 1 Reply Last reply
    0
    • U User 3672257

      I am trying to navigate to another page with the help of a button. I used onClick="window.location='http://localhost/adbintranet/index/GoldDriveCustInfo.aspx'" When i compile i get an error that reads: Compiler Error Message: BC30456: 'window' is not a member of 'ASP.GoldDrive_aspx'. I have tried different onClick methods but still get the BC30456. Please help.

      M Offline
      M Offline
      meeram395
      wrote on last edited by
      #2

      If you are writing the code Buttonclick event, it should be Response.Redirect("GoldDriveCustInfo.aspx"); window.location is javascript code. You cannot call the method directly. However you can add like this: //In Design page function OpenWindow() { window.open(url,windowname); } Button1.attributes.add("OnClick","OpenWindow()");

      Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.

      modified on Wednesday, July 9, 2008 7:01 AM

      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