asp:textbox embedded in repeater

C

Craig Buchanan

I have an asp:textbox embedded in a repeater. I would like to default a
value in the textbox, but when I try to use the format:

<asp:textbox id="qty" runat="server">
<%# DataBinder.Eval(Container.DataItem,"Quantity") %>
</asp:textbox>

I get an error.

Do I need to set the value in code?

Thanks,

Craig Buchanan
 
G

Guest

<asp:textbox id="qty" runat="server"><%# DataBinder.Eval(Container.DataItem,"Quantity") %></asp:textbox

Instead tr

<asp:textbox id="qty" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Quantity") %>'></asp:textbox

HTH
Suresh.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top