page_Load
-
how do you find out which button is clicked among many in a page?or what code should you write in page_Load method to find out which button was clicked?
-
how do you find out which button is clicked among many in a page?or what code should you write in page_Load method to find out which button was clicked?
You may use CommandName property of the Button Server control. Each Button has the unique Command Name. Ok. Then in Page_Load event, u may check for the Particular button using e.CommandName property. for ex, if(e.CommandName == "btn1") Hope it works fine with u.
Regards, Jay
-
You may use CommandName property of the Button Server control. Each Button has the unique Command Name. Ok. Then in Page_Load event, u may check for the Particular button using e.CommandName property. for ex, if(e.CommandName == "btn1") Hope it works fine with u.
Regards, Jay
Thank You Jay.:)That was really helpful.i have another question...if there are nN number of buttons in a datagrid and u want 2 know which button was clicked then what do u do?:confused: