Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 why can't access run time control on page when using Master Page?
Posted by A.Goodarzi on  5/12/2010 1:32:24 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
Hi all:
I create the HtmlTable (id="tb") in PlaceHolder (id="ph1"). but i cant access the Table and contoles into its.
Control c = Page.FindControl("ctl00$ContentPlaceHolder1$ph1");
c is not null,
Control c2 = c.FindControl("tb");
but c2 is null.

please Help me. tanks

Post Your Reply Post New Question

 Viewer's Reply
Runat Server controls - Creating controls at runtime
Answered By Moderator1 on 5/12/2010 9:41:45 AM

Run-time created controls should be placed at proper event, and declared properly in the code-behind section.. Then only you can access those controls at run-time.

But you are trying to access the td of a Html Table.. Make sure it is rendered properly at run time and check it contents.. Then try to access it.
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Introduction to Software Development
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks - Free 158 Page Preview
Take Advantage of Oracle's 2 Day DBA Course