Help On catching id in Grid View

Posted by Vijayar under C# on 12/21/2011 | Points: 10 | Views : 861 | Status : [Member] | Replies : 1
Hi
I am binding teachers from teachers table which had techer_id.Teacher Nameand save status in attendance table which has teacher_Id,Attendance _id
I am Placing a Button in footer template of grid view.I am writing to code for saving status by using radio button list.

<asp:TemplateField >
<EditItemTemplate>

</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="btnsave" Width="100px" Height="35px" runat="server" ImageUrl="../Images/save.png" CausesValidation="false" CommandName="Save"
ToolTip="Save" CommandArgument='<%#Eval("Teacher_Id")%>'/>
</FooterTemplate>
<ItemTemplate>

</ItemTemplate>
</asp:TemplateField>
</gridview>
I am unable to catch id .How to find id of Teacher
Please inform me.It;s very urgent.Where to write code

vijaya


Responses

Posted by: Sksamantaray on: 12/21/2011 [Member] Silver | Points: 25

Up
0
Down
can you add complete code of gridview and table structure of db?

Thanks,
Sanjay

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response