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

Reccomended ways to add data-driven checkboxes/textboxes, etc?

Hi everyone,

I need to add a few rows' worth of web controls to my page. It's supposed
to work like this: I have a DataTable to loop through, and every row in it
requires a corresponding text and checkbox on the form.

What would be a good way to go about adding the controls to my page while
walking through the DataTable? Should I attach a DataGrid to the table, and
put my web controls in that? That could work, but I'm not sure if that's
overengineering or if there's a preferred way. If you have any tips or
advice I'd be grateful to hear them, and thanks!
Nov 19 '05 #1
3 920
Are you looking for something similar to:
http://odetocode.com/Articles/231.aspx ?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 8 Jul 2005 08:58:39 -0700, "Jim Bancroft"
<as******@nowhere.com> wrote:
Hi everyone,

I need to add a few rows' worth of web controls to my page. It's supposed
to work like this: I have a DataTable to loop through, and every row in it
requires a corresponding text and checkbox on the form.

What would be a good way to go about adding the controls to my page while
walking through the DataTable? Should I attach a DataGrid to the table, and
put my web controls in that? That could work, but I'm not sure if that's
overengineering or if there's a preferred way. If you have any tips or
advice I'd be grateful to hear them, and thanks!


Nov 19 '05 #2
On Fri, 08 Jul 2005 08:58:39 -0700, Jim Bancroft wrote:
Hi everyone,

I need to add a few rows' worth of web controls to my page. It's supposed
to work like this: I have a DataTable to loop through, and every row in it
requires a corresponding text and checkbox on the form.

What would be a good way to go about adding the controls to my page while
walking through the DataTable? Should I attach a DataGrid to the table, and
put my web controls in that? That could work, but I'm not sure if that's
overengineering or if there's a preferred way. If you have any tips or
advice I'd be grateful to hear them, and thanks!

A DataGrid would do it. So will a Repeater.
Nov 19 '05 #3
Thanks for the link. What you have will do the trick; I was just curious
more than anything else whether there were other ways of doing it.

For example in the old ASP/ADO days it was easy to loop through a recordset
and output appropriate html tags each time through. Using a DataGrid works
fine, but it's a little more work than in the old days.

Nov 19 '05 #4

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

Similar topics

4
by: Sidharta | last post by:
Hi all, how come this doesn't work????? # convert to unix new lines $text = preg_replace("/\r\n/", "\n", $text); # remove extra new lines $text = preg_replace("/\n+/", "\n", $text); is...
16
by: Daniel Tonks | last post by:
First, please excuse the fact that I'm a complete MySQL newbie. My site used forum software that I wrote myself (in Perl) which, up until now, has used flat files. This worked fine, however...
0
by: Parkms | last post by:
Could you tell me an efficient ways or examples to exchange xml data? There are many scenarios to use xml. However in my case, I submit data using html' form tag so that it should be inserted in a...
2
by: big vinny | last post by:
Hi I've been writing some serializing functions to load/store classes into db tables. There appears to be 2 ways of doing it, 1) iterative, derived classes store their parent's data before...
8
by: Asha | last post by:
greetings, besides using objconn.State() to find out if a sql connection is close or open, is there any other way to accomplish this task? thanks in advance. anywhere is sql server or the machine...
4
by: Wysiwyg | last post by:
I need to validate a form to ensure that all of the fields add up correctly. I can't do this while the user is entering data since validation needs to be done after the entry is completed. What's...
7
by: JH Programmer | last post by:
Hi, is there any ways that allow us to delete an element in between? say int_val: 1 int_val: 2 int_val: 3
2
AHayes
by: AHayes | last post by:
This is actually my first post, so please forgive any forum "no-nos" in this post. _The Background For a work project, I need to port an ASP.Net (C#) search application to a SharePoint webpart....
2
by: O.B. | last post by:
I have operation within a class that marshals the data into a byte array. Below are three different ways that work. Are there any downsides to using one over the the other? public virtual byte...
1
by: Just D | last post by:
All, Returning to WinForms - what is the current situation with the MS SQL Server database access? Did anybody see any good review or can just give us his own impression about that? I'd like to...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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...

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.