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

Finding Controls in a Place Holder

Hi All

I am new to .Net and cant seem to fingure something out.

I Dynamically create a table based on data pulled from my SQL DB. As the
Information and table are shaped, i insert List Boxes with common answers to
the questions.

I add this table to Placeholder2.controls.add(Blm_Table) and it appears on
the page no problem

Now i need to loop thru the controls, (there are 8 of them) and insert the
answers into the SQL Server DB

How ever i cannot find them in my for each loop

I was using :
For Each control in PlaceHolder2.controls

next

But i cannot find any controls , in fact the control count when trace is
enabled is 0.

What am i Doing Wrong?

thanks in advance
Eliza
Nov 17 '05 #1
1 1292
I think that this has to do with when the controls are created. You may

have to create these controls every time the page re-loads.

George

"Elizabeth Harmon" <EH*****@bloomingtonfarms.com> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
Hi All

I am new to .Net and cant seem to fingure something out.

I Dynamically create a table based on data pulled from my SQL DB. As the
Information and table are shaped, i insert List Boxes with common answers to the questions.

I add this table to Placeholder2.controls.add(Blm_Table) and it appears on
the page no problem

Now i need to loop thru the controls, (there are 8 of them) and insert the
answers into the SQL Server DB

How ever i cannot find them in my for each loop

I was using :
For Each control in PlaceHolder2.controls

next

But i cannot find any controls , in fact the control count when trace is
enabled is 0.

What am i Doing Wrong?

thanks in advance
Eliza

Nov 17 '05 #2

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

Similar topics

2
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
6
by: Louise | last post by:
I use Visual Basic .NET Framework 1.1, Visual Studio. I have a Web page (aspx) referencing a control (ascx) that has a placeholder that is assigned one of 2 child controls through buttons. The...
14
by: Joe | last post by:
Hello All: I am trying to dynamically populate a web page with literal content and controls (textboxes and checkboxes (and eventually two buttons - the buttons do not appear in the code yet). I...
1
by: namewitheldbyrequest | last post by:
When I create a web form in VS 2005 I have a problem. I created a MasterPage with a ContentPlaceHolder object on it. Then I created a detail page that refrenced the Master Page. When I drag...
2
by: Phuff | last post by:
I need to add controls on a button click. I would prefer to do this in the page load or init functions, however due to the nature of the page I have to add them later on. When I try to enumerate...
3
by: JimCinLA | last post by:
I use a place holder to load different user controls on an .aspx page. Let's call this default.aspx. Each user controls contains about a dozen different ASP.Net controls. My question is, how...
7
by: Brad Baker | last post by:
I am trying to programmatically set a placeholder control in csharp which is nested inside a repeater control between <ItemTemplateand </ItemTemplate> tags, however I am running into problems. I've...
2
by: Raymond Du | last post by:
Hi, I need to find a way to place multiple textboxes and other controls dynamically on a web form, I tried to put a placeholder on a form then create and add controls dynamically into the place...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.