Click here to Skip to main content
15,885,680 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a question, how do I pass my button's command argument to the row updating event of asp.net gridview?

I have this code:

C#
<asp:Button ID="btnEdit" runat="server" CommandName="Edit" Text="Edit" CommandArgument='<%# Eval("id") %>' />


I have used this with my delete button and its working fine,

C#
int Deleteid = int.Parse((sender as ImageButton).CommandArgument);


I placed the code inside the ON CLICK EVENT OF MY BUTTON.

my question is, how do I fire this command argument. my edit button inside ROW UPDATING
since I need to update only the ROW which has the "id" just like what I did in my delete event, help please!
Posted
Comments
Ajesh1986 26-May-14 1:59am    
http://www.codeproject.com/Questions/59385/how-to-use-rowupdating-and-rowediting-in-gridview
Ajesh1986 26-May-14 1:59am    
Check that link bro...think that will help you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900