Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Button click JScript / wrong request.QueryString

Author  Topic 

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2005-09-02 : 10:32:07
When I click a button, I want to pop open an new window which tells the user what records they've udpated pertaining to a certain ID.
The request.QueryString() pulls in the name of the button, and not the ID.

I've go this in the Page_Load:

btnUpdateBudget.Attributes.Add("onClick", "window.open('UpdateBudgetConfirm.aspx?ScheduleActivityID='+this.value,'','width=500,height=300,left=200,top=200');")

...and this in the click even of the button:

btnUpdateBudget.Attributes.Add("onClick", "window.open('UpdateBudgetConfirm.aspx?ScheduleActivityID='+lblSAID.Text.ToString(),'','width=500,height=300,left=200,top=200');")

Is it something with the this.value?

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2005-09-02 : 15:06:45
Here's what I got to work, and this is all in Page_Load. All code was deleted in button_click event:

Dim strSAID As String = Request.QueryString("ScheduleActivityID")
btnUpdateBudget.Attributes.Add("onClick", "window.open('UpdateBudgetConfirm.aspx?UBID=" + strSAID + "','','width=470,height=230,left=200,top=200');")
Go to Top of Page
   

- Advertisement -