I have a problem with my gridview i am trying to auto populate a field like time. SO here is the code that i have written
Code:
<asp:TemplateField HeaderText="Time" SortExpression="Time">
<ControlStyle Width="60px" />
<ItemTemplate>
<asp:Label ID="lblTime" runat="server" Width="120px" Text='<%# Bind("Time") %>' CssClass="gvItem" />
</ItemTemplate>
<EditItemTemplate>
<asp:textbox ID="txtTime" runat="server" Width="120px" Text='<%# Format(Now, "hh.mm tt") %>' CssClass="gvItem" />
</EditItemTemplate>
<HeaderStyle Font-Bold="False" />
</asp:TemplateField>
It will show the right time but for some reason it will not populate out to the database what am i doing wrong.