hi all experts,
I am working on a simple gridview control, that adds some data to database,
my grid view code goes here,
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ShowFooter="True"
GridLines="Horizontal" Width="350px" HorizontalAlign="Justify">
<Columns>
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="Check" runat="server" /></ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label ID="LblName" runat="server" Text='<%#Eval("Name") %>'></asp:Label></ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Gender">
<ItemTemplate>
<asp:DropDownList ID="DDLGender" runat="server" DataTextField='<%Eval("Gender") %>'>
</asp:DropDownList>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddlGenders" runat="server">
<asp:ListItem>Male</asp:ListItem>
<asp:ListItem>Female</asp:ListItem>
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="City">
<ItemTemplate>
<asp:Label ID="lblCity" runat="server" Text='<%#Eval("City") %>'></asp:Label></ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCity" runat="server"></asp:TextBox></FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
here, i have 2 buttons
1. to insert data into database,
2. to delete the data(by selecting the checkbox & clicking delete btn)
here, how can i retrieve the dropdownlist & check box value in codebehind (.cs),
any help will be thankful..
shameer ali shaik