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