R
Roz Lee
I have a page with two textboxes and two buttons which post back to
the server. I want to detect which button has been clicked for
testing purposes preferably clientside, but otherwise serverside.
However, when I examine Page.Request.Form("__EventTarget") in my
aspx.vb Page Load sub , Page.Request.Form("__EventTarget") is nothing.
If I view source, the DoPostback function is not visible, nor are the
hidden EventTarget and EventArgument fields. However, if I add a
dropdown list to the page, these script blocks are inserted. On this
occasion, I find that Page.Request.Form("__EventTarget") is an empty
string.
When I add an editable datagrid control to the page and go into edit
mode by clicking a link button, when I click the update or cancel link
buttons Page.Request.Form("__EventTarget") is populated with the id of
the control I have clicked. Can anyone please tell me
1. why a button does not use the DoPostback function
2. in that case what I can use serverside to determine which button
caused the postback as Page.Request.Form("__EventTarget") is empty
3. how I detect which control caused the postback using clientside
Javascript
Thanks
Roz Lee
the server. I want to detect which button has been clicked for
testing purposes preferably clientside, but otherwise serverside.
However, when I examine Page.Request.Form("__EventTarget") in my
aspx.vb Page Load sub , Page.Request.Form("__EventTarget") is nothing.
If I view source, the DoPostback function is not visible, nor are the
hidden EventTarget and EventArgument fields. However, if I add a
dropdown list to the page, these script blocks are inserted. On this
occasion, I find that Page.Request.Form("__EventTarget") is an empty
string.
When I add an editable datagrid control to the page and go into edit
mode by clicking a link button, when I click the update or cancel link
buttons Page.Request.Form("__EventTarget") is populated with the id of
the control I have clicked. Can anyone please tell me
1. why a button does not use the DoPostback function
2. in that case what I can use serverside to determine which button
caused the postback as Page.Request.Form("__EventTarget") is empty
3. how I detect which control caused the postback using clientside
Javascript
Thanks
Roz Lee