473,406 Members | 2,336 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.

iterate thru controls in Table Cells?

Hi All

I am dynamically Creating DropDownList boxes for a Survey form. These
DropdownLists are added to Table Cells programatically.

I tried to loop thru the controls on the form but it doesnt seem to work
right, the loop appears below:

for each cntl in page.controls(1).controls
ddlId = cntl.Id
debug.write(ddlID)

next
nothing Fancy i am just trying to find the controls and then later on get
the value from the selection.

However, i can find the Table they are on but i never see the control it
self?????

How do i get the DropdownList when it is in a Table cell?

Any help is greatly Appreciated

TIA
Samantha
Nov 17 '05 #1
2 3668
"JDavies" <Jd*****@bloomingtonfarms.com> wrote in message
news:uh**************@TK2MSFTNGP10.phx.gbl...
Hi All

I am dynamically Creating DropDownList boxes for a Survey form. These
DropdownLists are added to Table Cells programatically.

I tried to loop thru the controls on the form but it doesnt seem to work
right, the loop appears below:

for each cntl in page.controls(1).controls
ddlId = cntl.Id
debug.write(ddlID)

next
nothing Fancy i am just trying to find the controls and then later on get
the value from the selection.

However, i can find the Table they are on but i never see the control it
self?????

How do i get the DropdownList when it is in a Table cell?

Any help is greatly Appreciated


Are you looking in the table's Controls collection? That will contain
TableRows. You would need to look in their Controls collection, which will
contain TableCells. Their Controls collection will contain your
DropDownLists (assuming that's where you put them).
--
John

Nov 17 '05 #2
Yes i am trying to find the controls in the table, but being new to .Net i
am not quite sure how i go about it

If you could send me to a web page example or provide and example i wuld
greatly appreciate it
TIA
Samantha
"John Saunders" <john.saunders at surfcontrol.com> wrote in message
news:uA**************@TK2MSFTNGP10.phx.gbl...
"JDavies" <Jd*****@bloomingtonfarms.com> wrote in message
news:uh**************@TK2MSFTNGP10.phx.gbl...
Hi All

I am dynamically Creating DropDownList boxes for a Survey form. These
DropdownLists are added to Table Cells programatically.

I tried to loop thru the controls on the form but it doesnt seem to work
right, the loop appears below:

for each cntl in page.controls(1).controls
ddlId = cntl.Id
debug.write(ddlID)

next
nothing Fancy i am just trying to find the controls and then later on get the value from the selection.

However, i can find the Table they are on but i never see the control it
self?????

How do i get the DropdownList when it is in a Table cell?

Any help is greatly Appreciated


Are you looking in the table's Controls collection? That will contain
TableRows. You would need to look in their Controls collection, which will
contain TableCells. Their Controls collection will contain your
DropDownLists (assuming that's where you put them).
--
John

Nov 17 '05 #3

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

Similar topics

2
by: Simon | last post by:
I've got a webform and many controls on it. I would like to iterate thru the control collection to get all the textboxes control to let me change the text property. Here is my code...for unknown...
2
by: sk2000 | last post by:
Hello All, I'm creating a web form with user controls in different HTML table cells (User Controls are place in the table cells at design time ). For some reason none of the Button type...
0
by: DotNetJunkies User | last post by:
Hi All I am developing a site using ASP.Net I want to develop a site that generates forms ( textbox,check boxes etc) automatically ie is from database itself depending on the no of rows in the...
2
by: Chad | last post by:
I have a problem that I am desperate to understand. It involves dynamically adding controls to a Table control that is built as a result of performing a database query. I am not looking to...
3
by: Anonymous | last post by:
Hello, in my init I am adding some controls into a placeholder. The complete procedure looks like this: Dim iLoop As Integer = 0 Dim table As New Table table.BackColor =...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
3
by: encoad | last post by:
Hi everybody, I'm hoping you can help me understand why this doesn't work, and perhaps someone can suggest a way for me to solve my problem. Essentially, I'm trying to add a row with a single cell...
0
by: comp974 | last post by:
ok, here is the situation, I am trying to construct a table with several ASP.net 2.0 controls in it during execution time in an VB.net enviroment. For starters, I have a textbox and a linkbutton...
1
by: djboyse | last post by:
Hi, I am dynamically creating a page that contains a table and within that table there is a drop down list and a button. The drop down list and button let the user rate something, so they select...
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: 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
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?
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
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.