How get value textbox in datalist row?

V

VB Programmer

In my ASPX page how do I get the .text value of a textbox that is in the
ItemTemplate of a datalist (using HTML)?

The textbox contains the quantity for a shopping cart item.

The textbox is called "txtQty" and the current HTML is this (I need to
replace xxxx with the text value from the textbox):

<A href='UpdateCart.aspx?CartId=<%# DataBinder.Eval(Container.DataItem,
"CartID") %>&Qty=xxxx'><IMG src="Resources/UpdateBtn.jpg" border="0"></A>

Thanks.
 
P

Patrick.O.Ige

Or
'UpdateCart.aspx?='<%#"Shop.aspx?CategoryId=" &
DataBinder.Eval(Container.DataItem, "Qty")%>'>
Patrick
 
V

VB Programmer

I get this error:

DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with
the name txtQty.

txtQty is a textbox that the user puts the quantity in. It's a simple
shopping cart. User puts in a qty then clicks update.
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top