473,387 Members | 1,520 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,387 software developers and data experts.

DataList

I am loading Product data into a DataList, the idea is to be able to select
(check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.

Nov 19 '05 #1
3 2703
You will have to loop through each list item and check for the checked
value.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"CCORDON" <tc******@hotmail.com> wrote in message
news:ec****************@TK2MSFTNGP10.phx.gbl...
I am loading Product data into a DataList, the idea is to be able to select
(check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.

Nov 19 '05 #2
That's what I'm having problems. How do I loop though all items in the
DataList and how do I get the checkbox value for each Item.

Thanks

"CCORDON" <tc******@hotmail.com> wrote in message
news:ec****************@TK2MSFTNGP10.phx.gbl...
I am loading Product data into a DataList, the idea is to be able to select
(check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.

Nov 19 '05 #3
untested, but something like
foreach(DataListItem dli in this.dgResults.Items)

{

}


--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"CCORDON" <tc******@hotmail.com> wrote in message
news:uI****************@TK2MSFTNGP14.phx.gbl...
That's what I'm having problems. How do I loop though all items in the
DataList and how do I get the checkbox value for each Item.

Thanks

"CCORDON" <tc******@hotmail.com> wrote in message
news:ec****************@TK2MSFTNGP10.phx.gbl...
I am loading Product data into a DataList, the idea is to be able to
select (check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.


Nov 19 '05 #4

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

Similar topics

1
by: pete K | last post by:
Is it possible in asp.net to have a datalist in the itemtemplate of another datalist? For example: <asp:datalist id="MyList" runat="server"> <ItemTemplate> <table border="0" width="300">...
4
by: V. Jenks | last post by:
What seems like a simple thing is apparently not so straightforward? I have a datalist. Inside of that datalist is an <itemtemplate> secion which contains other server controls such as a...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
4
by: Patrick.O.Ige | last post by:
I have a CheckBoxList in a DataList and i'm trying to get item Selected after doing a postBack. I have set my CheckBoxlist AutoPostBack="True" Any ideas what 'm doing wrong? It seems not to...
6
by: Paul | last post by:
I am trying to use a DataList and the ItemTemplate. I am binding the Datalist to a SQL query that gives me a list of Items with a Parent Category. I want to loop through all the items, but...
2
by: Hans Merkl | last post by:
Hi, I am trying to use a user control as EditItemTemplate in a DataList. It loads fine but I can't figure out how to bind to the data of the DataList. Here is what I have got so far: ...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
0
by: Les Caudle | last post by:
I have a menu system composed of a DataList nested inside a DataList. The outer DataList has it's DataSource (composed of a DataSet with two tables linked by a CategoryPagesRelation Relation) set...
1
by: AJ | last post by:
Hi all, With the following code in mind : <asp:DataList ID="dlOne" DataKeyField="myField1" DataSource="<%# GetDataSource1()" Runat="server"> <ItemTemplate> Output Value Here! <asp:DataList...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.