Hello,
i am working on attendance sheet firstly i inserted my dropdownlist derived from database and inserted the values into gridview and inserted into xml but now i have a texbox outside the gridview and i have to send textbox value along with gridview into xml file.
please help me out Thanks in Advance.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<fieldset style="width:320px;">
<legend>DropDownList selected value details in GridView</legend>
<table>
<tr>
<td>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:TextBox ID="txtDate1" runat="server"/>
<asp:ImageButton ID="imgbtnCalendar" runat="server" ImageUrl="~/image/calendar-icon (1).png" Width="30" Height="30" />
<ajaxToolkit:CalendarExtender ID="CalendarExtender1" TargetControlID="txtDate1" PopupButtonID="imgbtnCalendar" runat="server"/>
<asp:Label ID="lblcalender" runat="server"></asp:Label>
</td>
</tr>
<tr><td>
<asp:DropDownList ID="ddlEmpRecord" runat="server" AutoPostBack="True"
Height="18px"
Width="121px" CausesValidation="True" OnSelectedIndexChanged="ddlEmpRecord_SelectedIndexChanged">
</asp:DropDownList><br />
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToValidate="ddlEmpRecord" Display="Dynamic"
ErrorMessage="Please select Emp id" ForeColor="Red" Operator="NotEqual"
SetFocusOnError="True" ValueToCompare="-- Select --"></asp:CompareValidator>
</td></tr>
<tr><td colspan="2">
<asp:GridView ID="grdEmp" runat="server" AutoGenerateColumns="false" >
<Columns>
<asp:BoundField HeaderText="EmpId" DataField="Emp_Id" />
<asp:BoundField HeaderText="EmpName" DataField="EmpName" />
<asp:BoundField HeaderText="City" DataField="City" />
<asp:BoundField HeaderText="Salary" DataField="Salary" />
</Columns>
<Columns>
<asp:TemplateField HeaderText="Attandance" >
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:RadioButtonList ID="rbtgv" runat="server" RepeatDirection="Horizontal" >
<asp:ListItem Value="0" Text="Present"></asp:ListItem>
<asp:ListItem Value="1" Text="Absent"></asp:ListItem>
<asp:ListItem Value="2" Text="Leave"></asp:ListItem>
</asp:RadioButtonList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView></td></tr>
<tr><td colspan="2"></td></tr>
<tr>
<td>
<asp:Button ID="btnsave" runat="server" Text="SAVE" OnClick="btnsave_Click" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label1" runat="server" ></asp:Label>
</td>
</tr>
</table>
</fieldset>
</div>
</form>
</body>
</html>