473,508 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Easy need to add ddl to loop

Hi!

The following loop works great, but I want to add the following to it,
but not sure how since the others are textboxes and this is a
dropdownlist (ddl).

txtinvloc.SelectedItem.Value

for i = 0 to 14
'Dim strNumber as string =
sender.Name.Substring(Len("txtacctnum"))
Dim tb as TextBox
Dim tc as TextBox
Dim td as TextBox
Dim te as TextBox

if i = 0 then
'Looks for the txtacctnum
'loops through all txtacctnum, checking
txtacctnum, txtacctnum1, ... txtactnum14
tb = CType(FindControl("txtAcctNum"),
TextBox)
tc = CType(FindControl("txtCostCntr"),
TextBox)
td = CType(FindControl("txtRefNum"),
TextBox)
te = CType(FindControl("txtAcctAmt"),
TextBox)

else
'Looks for txtacctnum0 - txtacctnum14
tb = CType(FindControl("txtAcctNum" & i),
TextBox)
tc = CType(FindControl("txtCostCntr" & i),
TextBox)
td = CType(FindControl("txtRefNum" & i),
TextBox)
te = CType(FindControl("txtAcctAmt" & i),
TextBox)
End If
if (Not IsNothing(tb)) AndAlso len(tb.Text) >
0 then
Also how do I display it later on in my case statement?
this is how the other was used:
If tc.Text = "" Then
lblResult3.Text = "Please enter
a cost center."

elseif txtinvloc.SelectedItem.Value =
"081" <<<<<------how do I display
I tried selected.item.value and others but I need to figure it
out...thanks!!! I don't want to rewrite the code, just add that
line...thanks!!!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
1 1066


I figured it...so please ignore this post.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

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

Similar topics

9
3188
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
5
5140
by: Mike | last post by:
I'm having problem using strConv("john", 3) to generate a propercase version of john. does strConv not work in ASP??? Any advise is greatly appreciated. Thanks, Mike
5
19541
by: Ken Fine | last post by:
Suppose I've built a recordset. I want some code to run for each record in the recordset in a "loop." In ASP VBScript, how would you express the following: For each in next The only...
5
1544
by: Harold Howe | last post by:
Howdy, 1- Are property reads in effect volatile? Or is the compiler allowed to optimize property reads away? ie class foo { public int bar { get { return m_bar;}
1
1388
by: DaVinci | last post by:
I did a google web & group search and didn't find an answer to my question so... here we go. Will try to keep it short. (I am not a complete beginner but am still pretty low on the food chain). ...
5
1434
by: greg | last post by:
I'm sure this is easy - if someone could give me a push in the right direction I would apprieciate it! If you have multiple categories CatID - NAME - ParentID 1 root 0 2 ...
9
1298
by: Mark Walsh | last post by:
The following is an explanation of a bug that exists in the VB.NET compiler. I've tried to report it to Microsoft, but they've made it so difficult I've given up: MSDN help states that variables...
6
1304
by: Mark Walsh | last post by:
The following is an explanation of a bug that exists in the VB.NET compiler. I've tried to report it to Microsoft, but they've made it so difficult I've given up: MSDN help states that variables...
6
1479
by: Shisou | last post by:
Hey guys, This should be easy but I need a little help. This is in C... I have an array or ints I need to put something at the end that I can find to stop a loop... I tried using '\0' or...
0
7224
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
7323
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
7380
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
7494
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
5626
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,...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
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...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
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...

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.