Clicking DetailsView’s Update button doesn’t cause a postback
- by AspOnMyNet
If I define the following template inside DetailsView, then upon clicking an Update or Insert button, the page is posted back to the server:
<EditItemTemplate>
<asp:TextBox ID="txtDate" runat="server" Text='<%# Bind("Date") %>'></asp:TextBox>
<asp:CompareValidator ID="valDateType" runat="server" ControlToValidate="txtDate" Type="Date" Operator="DataTypeCheck" Display="Dynamic" >*</asp:CompareValidator>
</EditItemTemplate>
But if I remove CompareValidator control from the above code, then for some reason clicking an Update or Insert button doesn’t cause a postback...instead nothing happens:
<EditItemTemplate>
<asp:TextBox ID="txtDate" runat="server" Text='<%# Bind("Date") %>'></asp:TextBox>
</EditItemTemplate>
Any idea why page doesn't get posted back?
thanx