L
Luis Esteban Valencia
am trying to databind within an asp:textbox control. I have tried many
variations found here but nothing seems to work. It works fine if I use a
regular HTML textbox input though. Here is what I have tried:
<asp:textbox id='<%#DataBinder.Eval(Container.DataItem, "EmailID")%>'
cssclass="textbox" runat="server"><%#DataBinder.Eval(Container.DataItem,
"Email")%></asp:textbox>
I get '<%# DataBinder.Eval(Container.DataItem, "segEmailID").ToString() %>'
is not a valid identifier.
Then
<asp:textbox id="<%#DataBinder.Eval(Container.DataItem, "EmailID")%>"
cssclass="textbox" runat="server"><%#DataBinder.Eval(Container.DataItem,
"Email")%></asp:textbox>
I get 'The server tag is not well formed.'
Finally I tried without the #:
<asp:textbox id='<%DataBinder.Eval(Container.DataItem, "EmailID")%>'
cssclass="textbox" runat="server"><%DataBinder.Eval(Container.DataItem,
"Email")%></asp:textbox>
I get '<%DataBinder.Eval(Container.DataItem, "segEmailID").ToString() %>' is
not a valid identifier.
Thanks for your help! BTW - this asp:textbox control is within a
repeater.....
Thanks again!
variations found here but nothing seems to work. It works fine if I use a
regular HTML textbox input though. Here is what I have tried:
<asp:textbox id='<%#DataBinder.Eval(Container.DataItem, "EmailID")%>'
cssclass="textbox" runat="server"><%#DataBinder.Eval(Container.DataItem,
"Email")%></asp:textbox>
I get '<%# DataBinder.Eval(Container.DataItem, "segEmailID").ToString() %>'
is not a valid identifier.
Then
<asp:textbox id="<%#DataBinder.Eval(Container.DataItem, "EmailID")%>"
cssclass="textbox" runat="server"><%#DataBinder.Eval(Container.DataItem,
"Email")%></asp:textbox>
I get 'The server tag is not well formed.'
Finally I tried without the #:
<asp:textbox id='<%DataBinder.Eval(Container.DataItem, "EmailID")%>'
cssclass="textbox" runat="server"><%DataBinder.Eval(Container.DataItem,
"Email")%></asp:textbox>
I get '<%DataBinder.Eval(Container.DataItem, "segEmailID").ToString() %>' is
not a valid identifier.
Thanks for your help! BTW - this asp:textbox control is within a
repeater.....
Thanks again!