D
David Adams
Hi,
I have a dilemma that I was able to handle previously with ASP.NET 1.1. I
have a MasterPage that has an image which changes depending on the currently
loaded .aspx page. I used to do something like this in 1.1 within the
UserControl:
if (this.NamingContainer is agents)
imgHeader.ImageUrl="images\agents.gif";
else if (this.NamingContainer is managers)
imgHeader.ImageUrl="images\agents.gif";
Now, within the MasterPage, I cannot refer to a partial class (apparently)
like I did above - specifically I cannot say:
if (this.ContentPlaceHolder.Page is agents) // partial class not available
imgHeader.ImageUrl="images\agents.gif";
Is there a way I can refer to the type of a partial class?
This would also be helpful if I am exposing properties in the partial class.
Thanks,
David
I have a dilemma that I was able to handle previously with ASP.NET 1.1. I
have a MasterPage that has an image which changes depending on the currently
loaded .aspx page. I used to do something like this in 1.1 within the
UserControl:
if (this.NamingContainer is agents)
imgHeader.ImageUrl="images\agents.gif";
else if (this.NamingContainer is managers)
imgHeader.ImageUrl="images\agents.gif";
Now, within the MasterPage, I cannot refer to a partial class (apparently)
like I did above - specifically I cannot say:
if (this.ContentPlaceHolder.Page is agents) // partial class not available
imgHeader.ImageUrl="images\agents.gif";
Is there a way I can refer to the type of a partial class?
This would also be helpful if I am exposing properties in the partial class.
Thanks,
David