Find Controls in Code

P

Paul Cheetham

Hi,

I have a project where I need to find a control on a page in code.
I read a control ID name from a database, and then need to find it on
the page so that I can change some properties. (I'm doing it in
Page_Load or Page_LoadComplete)

I have used Controls.GetEnumerator, and enumerated through the controls
of the page.
Because my page is based on a master page, the only control it finds
appears to be the master page!
I then tried enumerating through the controls of the master page, but
only found a few controls that must have been generated by the master.


Has anybody done this sort of thing before so they can point me in the
right direction?
I'm sure it must be possible, but I'm missing something somewhere.


I'm using c# in .Net 2


Thankyou.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top