473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How get value textbox in datalist row?

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.
Nov 20 '05 #1
3 13702
have you tried Qty.Text
Patrick
"VB Programmer" <do**@emailme.com> wrote in message
news:eY**************@TK2MSFTNGP14.phx.gbl...
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.

Nov 20 '05 #2
Or
'UpdateCart.aspx?='<%#"Shop.aspx?CategoryId=" &
DataBinder.Eval(Container.DataItem, "Qty")%>'>
Patrick
"VB Programmer" <do**@emailme.com> wrote in message
news:eY**************@TK2MSFTNGP14.phx.gbl...
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.

Nov 20 '05 #3
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" <pa********@optusnet.com.au> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Or
'UpdateCart.aspx?='<%#"Shop.aspx?CategoryId=" &
DataBinder.Eval(Container.DataItem, "Qty")%>'>
Patrick
"VB Programmer" <do**@emailme.com> wrote in message
news:eY**************@TK2MSFTNGP14.phx.gbl...
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.


Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: etantonio | last post by:
Good Morning, I still havent solved my problem with a textbox inside an editItemTemplate of a datalist, in fact now it is filled with the word "CIAOOOOOO" , if a runtime in the form I put a...
2
by: CDWaddell | last post by:
I have the following cod private void btnUpdate_Click(object sender, System.EventArgs e TextBox tbMembers = new TextBox() tbMembers = (TextBox) dlClubs.FindControl("tbMembers") string...
0
by: Peter Afonin | last post by:
Hello: I've never used the DataList before, and I have a problem now: In the ItemTemplate I put the LinkButton and a TextBox (not databound, I want the user to be able to type in it). Then I...
0
by: Xiru | last post by:
I would like to retrieve the value from a DataList on postback. I can read the ItemIndex and values from a child TextBox but not cannot seem to find a way to read a databound item on the datalist....
2
by: donnet | last post by:
Inside my .aspx file, I have a textbox populated with data from a dataset like this: <asp:TextBox text='<%# DataBinder.Eval(Container.DataItem, "Comment")%>' id="CommentText" runat="server"...
2
by: Antonio D'Ottavio | last post by:
Good Morning, I've a problem with a textfiled inside a datalist, in particular it's value it is not updated with the changes, I mean sNomeCampo has still the value coming from the dB and not that...
2
by: VB Programmer | last post by:
I have a datalist for a shopping cart summary. Each data "row" has a text box where they can enter a quantity. How do I loop thru the entire datalist to figure out the total shopping cart price?
9
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i'm trying to use the onblur client-side event to get the value of TextBox1 but can't seem to nail down the syntax. can someone please help? thanks, rodchar
1
by: BisMan | last post by:
I have a datalist called datalist2 I want to get the text from a textbox called textbox1 which is in the ItemTemplate of the datalist. In the past I have gotten information out of the create...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.