473,493 Members | 2,265 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Retrieving values from dynamic controls

I have dynamically created n number of text boxes in a form like txtQL(1),
txtQL(2) , ...txtQL(n)
How I retrieve the values in a loop? I'm confused as to how to approach
this! Please help.

Thanks for your time.
Jul 21 '05 #1
1 1270
I get the error "Referenced object has a value of 'Nothing'". as indicated in
the code below:

For Each c In Controls
If i < maxRow Then
Error txtQLLink(i) = c.FindControl("txtQLLink(" + i & ")")

txtQLUrl(i) = c.FindControl("txtQlUrl(" + i & ")")
If txtQLLink(i).Text <> "" Then
textQLHtml = textQLHtml & txtQLUrl(i).Text & txtQLLink(i).Text
strQL = strQL & txtQLLink(i).Text & "," & txtQLUrl(i).Text
i += 1
End If
End If
Next
I created the controls dynamically! But cant seem to figure out how to
retrieve it dynamically?!! Please help.
Jul 21 '05 #2

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

Similar topics

1
1264
by: tascien | last post by:
I have a user control that has dynamic controls loaded to it in Page_Init. this works well. I have a function inside the user control: GetValues() When i add this usercontrol to a page:...
2
2919
by: Ben Amada | last post by:
I'm a little confused about in what Event should I add dynamic controls and in what Event should I retrieve the value of a dynamic control on postback. I've found that adding dynamic controls in...
1
284
by: Victor | last post by:
I have dynamically created n number of text boxes in a form like txtQL(1), txtQL(2) , ...txtQL(n) How I retrieve the values in a loop? I'm confused as to how to approach this! Please help. ...
1
2904
by: Joe | last post by:
Hello All, I have a user control which is composed of a label and a dropdownlist. In my code I add the user control to a placeholder on the webform. Now I want to be able to retrieve the...
3
2523
by: Dotnet Gruven | last post by:
I've built a WebForm with a Table added dynamically in Page_Load when IsPostBack is false. The table includes a couple of TextBoxes, RadioButtonLists and CheckboxLists. On postback, those...
3
3087
by: Andreas Wöckl | last post by:
Hi Group! I have a web form that is created dynamically - so I create Textboxes, RadioButtonLists, CheckBoxLists and so on - I have found some articles that there may be some problems with...
5
4438
by: Nathan Sokalski | last post by:
I have a custom control that I wrote (I inherit from System.Web.UI.WebControls.CompositeControl). I dynamically add this control to my Page, but I was told that dynamically added controls do not...
0
1191
by: cruz | last post by:
Hi all, I am now developing an asp.net/C# web application. In this, in one aspx (say 'Parent page') page I am using two Iframes. Each Iframe source file (that are also .aspx file, say 'child1' and...
2
4215
by: =?Utf-8?B?TG91aXNhOTk=?= | last post by:
Hello. ive just read some posts on the age old issue of losing dynamic control values on postback. Most people say recreate the controls on the onInit, but i just dont think this serves my purpose....
0
6989
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
7157
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
7195
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
7367
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...
1
4889
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
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
644
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
285
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.