When I click on a button which is outside of the GridView in my asp.net page, the GridView rowdatabound event is getting fired before OnClick event for the button. I am using the button for custom paging so I need to reverse the order of these events. Any thoughts ??
Thanks in Advance, – Amit
Possibly because you are calling
DataBind()on the GridView in thePage_Loadevent. You should note thatPage_Loadwill always be called before the event that raised the postback… theButton_Clickin your case.I suggest reading up on the ASP.NET Page Life cycle to learn more.