Click here to Skip to main content
15,868,016 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionReferencing User Control Attributes in Page Code Behind Pin
janetb991-Dec-11 11:40
janetb991-Dec-11 11:40 
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 
Sorry, that won't work for me if I can't reference the control to change the style. Understand the problem now? Let me try and be a little more precise, maybe that will help. I really think it's something to do with master/child since I was able to successfully reference one when not using the master.

XML
Master:
<%@ Master Language="VB" CodeFile="SSLmaster.master.vb" Inherits="master" EnableTheming="true"  %>
<body>
<form id="form1" runat="server" enableviewstate="true"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder>
yahda, yahda, yahda...

Child:
<%@ Page Title="yahda" Theme="SSL" Language="VB" MasterPageFile="~/inc/SSLmaster.master" AutoEventWireup="false" CodeFile="zdetail1.aspx.vb" Inherits="calendar_zdetail1" %>
<%@ Register Src="~/inc/ceSteps.ascx" TagName="ceSteps" TagPrefix="uc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

UserControl:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ceSteps.ascx.vb" Inherits="inc_ceSteps" %>
<asp:Panel runat="server" ID="Panel1" >&nbsp;Step 1&nbsp;</asp:Panel>

CodeBehind of Child:
First Stab (successful on page without Master):
Dim myPnl As Panel = CType(CType(FindControl("ceSteps"), UserControl).FindControl("pnlStage1"), Panel)
myPnl.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

Second Stab (and many more variations)
Dim myConPH As ContentPlaceHolder
myConPH = CType(FindControl("SSLmaster_ContentPlaceHolder1"), ContentPlaceHolder)
Dim myPnl As Panel = CType(CType(myConPH.FindControl("ceSteps"), UserControl).FindControl("pnlStage1"), Panel)
myPnl.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

GeneralRe: Referencing User Control Attributes in Page Code Behind Pin
jkirkerx2-Dec-11 8:49
professionaljkirkerx2-Dec-11 8:49 
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 

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.