Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How get value textbox in datalist row?

Reply
Thread Tools

How get value textbox in datalist row?

 
 
VB Programmer
Guest
Posts: n/a
 
      11-16-2005
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.


 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      11-16-2005
have you tried Qty.Text
Patrick


"VB Programmer" <> wrote in message
news:...
> 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.
>
>



 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      11-16-2005
Or
'UpdateCart.aspx?='<%#"Shop.aspx?CategoryId=" &
DataBinder.Eval(Container.DataItem, "Qty")%>'>
Patrick


"VB Programmer" <> wrote in message
news:...
> 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.
>
>



 
Reply With Quote
 
VB Programmer
Guest
Posts: n/a
 
      11-16-2005
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.

"Patrick.O.Ige" <> wrote in message
news:%...
> Or
> 'UpdateCart.aspx?='<%#"Shop.aspx?CategoryId=" &
> DataBinder.Eval(Container.DataItem, "Qty")%>'>
> Patrick
>
>
> "VB Programmer" <> wrote in message
> news:...
>> 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.
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox value in the edittemplate of a datalist doesn't report the changes Antonio D'Ottavio ASP .Net 2 09-26-2005 03:26 PM
Textbox value in the edittemplate of a datalist doesn't report the changes Antonio D'Ottavio ASP .Net 2 09-26-2005 03:26 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
How to get value from a textbox in DataList Peter Afonin ASP .Net Web Controls 0 04-07-2004 01:47 AM
How to get value from a textbox in DataList Peter Afonin ASP .Net 0 04-07-2004 01:47 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57