<pre lang="xml">asp:TemplateField HeaderText="Date of Birth" SortExpression="D_O_B"> <EditItemTemplate> <asp:TextBox ID="txtgrddob" runat="server" Text='<%# Eval("D_O_B","{0:dd/MMM/yyyy}") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="lblgrddob" runat="server" Text='<%# Bind("D_O_B","{0:dd/MMM/yyyy}") %>'></asp:Label> </ItemTemplate> </asp:TemplateField>
DataRow dr = ds.Tables[0].Rows.Find(grdReplicate.DataKeys[e.RowIndex].Values[0].ToString()); dr["D_O_B"] = txtdob.Text;
DateTime
Label
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)