I have a literal control within a ContentPlaceHolder on my master page. In the master page code behind, I want to check to see if the literal is still there and if so, update the text.
This is my code, but it always believes my literal control does not exist:
String myImagePath = Page.ResolveUrl("~/images/sbimages/").ToString();
Literal myTestLiteral = (Literal)Page.FindControl("headerImageLiteral");
if (myTestLiteral != null)//make sure the literal exists because if someone overrode the master page template, the literal wouldn't exist
{
myTestLiteral .Text = "<img Height=\"82px\" alt=\"Header Image\" src=\"" + myImagePath + "mission.jpg\" Width=\"643px\" />";
}
&nb ...
Go to the complete details ...