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

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 1269
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
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
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
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
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
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
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
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
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
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
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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...

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.