Current location: Hot Scripts Forums » Programming Languages » ASP.NET » how to find control in placeholder


how to find control in placeholder

Reply
  #1 (permalink)  
Old 01-13-04, 11:44 PM
nnet nnet is offline
New Member
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
how to find control in placeholder

On my page I have a table and in each cell of the table I have placeholder. I am readring from a database and each table in the database is represented by each placeholder of the table on my page. For example, one of the placeholder id is "xyz_P". there is a tabel in the database called "xyz". when loading the page, I am looking for a record in each table of the database. so if xyz has the record I am looking for, I will programatically create a Datalist called xyz_D inside the xyz_P Placeholder. then I load a template in the database and bind the data to the datalist.
The following is my loading code:
if(reader.HasRows == true)
{
cName = new DataList();
cName.DataSource = reader;
cName.ItemTemplate = Page.LoadTemplate("template/wData/" + tabName + ".ascx");
cName.ID = tabName + "_DataList";
status.Text += cName.ID.ToString() + "\n";
cName.DataBind();
placeHolderName.Controls.Add(cName);
}

now if the user clicks the submit button I am trying to read the form back to the database. I can say the following code:
PlaceHolder ph = (PlaceHolder)Page.FindControl("xyz_P");

and find it. but then I can't find any control inside ph.
any idea why?

I simply need to find the datalist xyz_D and the checkboxes inside it. any idea how to read them back.

Last edited by nnet; 01-13-04 at 11:49 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PlaceHolder Control kamlesh_nadar ASP.NET 6 10-12-06 07:26 AM
can't find a script ahalliday Script Requests 1 12-31-03 06:39 AM
control panel for hosting phpdeveloper PHP 3 12-30-03 04:20 AM
Cell with dynamic control candykung ASP.NET 1 12-25-03 12:17 AM
is it possible to find out what script this is? vashawtee PHP 0 09-02-03 07:20 PM


All times are GMT -5. The time now is 02:41 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.