G
Guest
I'm trying to figure out what is wrong with this statement...
Text='<%# DataBinder.Eval(Container.DataItem, "EventStartDate", "{0:d}")%>'
This is in a textbox. I'm using the exact format of this statement as a
stand along value (not embedded in an ASP control), but when I place it into
the Textbox control, I get an error as follows: 'System.Web.UI.Control' does
not contain a definition for 'DataItem'.
The format within my control looks OK to me, here is the code for the entire
control
<asp:TextBox ID="txtEditEventStartDate" Runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "EventStartDate",
"{0:d}")%>'></asp:TextBox><br>
But There must be something wrong that I do not see.
Text='<%# DataBinder.Eval(Container.DataItem, "EventStartDate", "{0:d}")%>'
This is in a textbox. I'm using the exact format of this statement as a
stand along value (not embedded in an ASP control), but when I place it into
the Textbox control, I get an error as follows: 'System.Web.UI.Control' does
not contain a definition for 'DataItem'.
The format within my control looks OK to me, here is the code for the entire
control
<asp:TextBox ID="txtEditEventStartDate" Runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "EventStartDate",
"{0:d}")%>'></asp:TextBox><br>
But There must be something wrong that I do not see.