Click here to Skip to main content
15,881,938 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Referencing User Control Attributes in Page Code Behind Pin
jkirkerx1-Dec-11 11:55
professionaljkirkerx1-Dec-11 11:55 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
janetb992-Dec-11 4:55
janetb992-Dec-11 4:55 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
janetb992-Dec-11 5:05
janetb992-Dec-11 5:05 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
jkirkerx2-Dec-11 7:13
professionaljkirkerx2-Dec-11 7:13 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
janetb992-Dec-11 7:57
janetb992-Dec-11 7:57 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
jkirkerx2-Dec-11 7:32
professionaljkirkerx2-Dec-11 7:32 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
janetb992-Dec-11 7:53
janetb992-Dec-11 7:53 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
jkirkerx2-Dec-11 8:49
professionaljkirkerx2-Dec-11 8:49 
I'm looking at your markup code, I understand the markup code,

But I have no idea what your trying to achieve. What the steps are, the purpose of changing the color, when and where.

My interpretation is that you want to find the asp.net ID of the panel control in the child webform, make a handle to it, and change the background color of the panel.

Not the Answer but here's how it works::

When adding a master page, the id of the control will be prefixed with CT_100_ or CT100_
That's the only difference between the 2 scenarios. MasterPage will also start to auto ID your controls, if you don't assign a ID manually. In other words, when you master page, asp.net will automatically fix all your control id's so it can find and track the controls, and disregards your need to find them. Every control has to have a unique ID, and no one can be the same.

So myPnl becomes CT_100_myPnl if you assign the ID atribute. If you don't assign the ID attribute, asp.net will assign a senquential auto naming ID code to the control object, and find control will never find it.

Naming Practices:
When naming a control in a user control, you can use ID = [ID] & "_myPnl", which produces CT_100_ceSteps_myPnl
This will stop the auto id's of your controls, so you actually are in charge of naming your objects.

Diagnostics:
So look at the html that was created by the server in the browsers source, in both with and without master page, and write down the control id or each one. And put that exact name in find control. Oh, ever the placeholder name will change as well.


I haven't used find control in years, and I abandoned the use of it, and have forgotten how to use it in master pages. Over the years I learned how to access any object on the page, at the right time and place, so that's not an issue for me anymore.
AnswerRe: Referencing User Control Attributes in Page Code Behind Pin
RichardGrimmer5-Dec-11 5:37
RichardGrimmer5-Dec-11 5:37 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
janetb996-Dec-11 8:40
janetb996-Dec-11 8:40 
GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
janetb996-Dec-11 9:06
janetb996-Dec-11 9:06 
Questionconvert detailsview control to formview control Pin
classy_dog1-Dec-11 8:43
classy_dog1-Dec-11 8:43 
QuestionHow to Create a Dynamic Questionnaire Pin
Vimalsoft(Pty) Ltd1-Dec-11 3:49
professionalVimalsoft(Pty) Ltd1-Dec-11 3:49 
QuestionThe header and footer contents in master page are refreshing - Need help Pin
Member 322226430-Nov-11 19:21
Member 322226430-Nov-11 19:21 
AnswerRe: The header and footer contents in master page are refreshing - Need help Pin
uspatel30-Nov-11 23:10
professionaluspatel30-Nov-11 23:10 
AnswerRe: The header and footer contents in master page are refreshing - Need help Pin
jkirkerx1-Dec-11 11:29
professionaljkirkerx1-Dec-11 11:29 
GeneralRe: The header and footer contents in master page are refreshing - Need help Pin
Member 32222641-Dec-11 23:38
Member 32222641-Dec-11 23:38 
GeneralRe: The header and footer contents in master page are refreshing - Need help Pin
jkirkerx2-Dec-11 6:23
professionaljkirkerx2-Dec-11 6:23 
GeneralRe: The header and footer contents in master page are refreshing - Need help Pin
Member 32222645-Dec-11 19:06
Member 32222645-Dec-11 19:06 
QuestionWCF message edit error Pin
arnold0930-Nov-11 19:19
arnold0930-Nov-11 19:19 
AnswerRe: WCF message edit error Pin
jkirkerx1-Dec-11 11:49
professionaljkirkerx1-Dec-11 11:49 
GeneralRe: WCF message edit error Pin
arnold092-Dec-11 0:45
arnold092-Dec-11 0:45 
GeneralRe: WCF message edit error Pin
jkirkerx2-Dec-11 6:36
professionaljkirkerx2-Dec-11 6:36 
GeneralRe: WCF message edit error Pin
arnold095-Dec-11 18:55
arnold095-Dec-11 18:55 
GeneralRe: WCF message edit error Pin
jkirkerx6-Dec-11 6:45
professionaljkirkerx6-Dec-11 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.