473,554 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looping thru all DDL on a form, checking for value

Using VB ..

Is there a way to loop through all drop down lists on a web form
checking for a specific value (ddlDropDown.Se lectedValue) and then,
based on that value, cause a specific label to go visible or not?

Nov 21 '06 #1
1 1395
recursivly loop thru all controls checking the type.


LoopThruControl s(this);

void LoopThruControl s(Control ctl)
DropDownList ddl = ctl as DropDownList;
if (ddl !=null)
// do somthing with selected value
foreach (Control child in ctl.Controls)
LoopThruControl s(child);

-- bruce (sqlwork.com)

"Jim in Arizona" <ti*******@hotm ail.comwrote in message
news:O4******** ******@TK2MSFTN GP06.phx.gbl...
Using VB ..

Is there a way to loop through all drop down lists on a web form checking
for a specific value (ddlDropDown.Se lectedValue) and then, based on that
value, cause a specific label to go visible or not?


Nov 21 '06 #2

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

Similar topics

by: ensnare | last post by:
Hi all, I'm using a database session handler and am looking to loop through data residing in the sessions table to make a 'Users online' array. I've found that using urldecode on the data column gives me a serialized string of varname|datatype:data; for each variable. I'm having a bit of trouble with deserializing the data. I could...
by: David | last post by:
Hello. I am looking for advice on what is "best practice" regarding looping through a form to check its checkboxes and associated data fields. Here is what I am trying to do (Here is the page I am working on: http://www3.telus.net/thothworks/LinLeastSqPoly4.html). I provide a form for a user to enter up to twenty (M = 20) data pairs. The...
by: sparks | last post by:
I was going to loop thru the tables and change some properties. 10 <<<<<< prp.value --prp.name = Type False <<<<prp.value --prp.name = allow zero length 10 <<<<<< prp.value --prp.name = Type True <<<<prp.value --prp.name = allow zero length 10 <<<<<< prp.value --prp.name = Type True <<<<prp.value --prp.name = allow zero length 10 <<<<<<...
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
by: Nick | last post by:
Hi - I'm trying to loop through the textboxes on a page to unlock them for editing. The Enabled property is set to false, and the following code is on an 'Edit' button on the form. Can anyone tell me why it doesn't work? Thanks Nick. Code:
by: Spycat | last post by:
Hi all and happy holidays! I should start off by stating I am NOT a PHP programmer. I say that so that in any response to me, you will speak very s-l-o-w-l-y or I won't know what you're talking about ;-) I have this form processor script that I basically pieced together from 3 different scripts. The script includes a CAPTCHA image...
by: pob | last post by:
Whats the difference between using a control or a listbox when looping thru a listbox. In example 1 it dims a listbox and an example 2 it dims a control. Please explain. Thanks in advance Example 1 from Allen Browne MVP Access To use a Multiselect list box for criteria for a report, you need to loop through its ItemsSelected collection...
by: pds79 | last post by:
Hi everyone, I'm a newbie to the forum. I have an issue and was hoping to get some assistance/ideas: Im trying to read a XML file into two record sets. I can acheive looping through the first level element but i can not loop the the second level (child elements), any ideas?? I need to be able to loop thru each patient record and read...
by: muppetjones | last post by:
I'm really new to the whole networking side of things, so I don't know the backend very well. I wrote a series of PHP/AJAX scripts to allow a user to create a login account, but apparently my script is doing much much more than I imagined as I received an email from my admin this morning: I think a core dump means my program had a fatal...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.