I have a div within the body of my page, and it looks like this -
<div runat="server" class="row" style="display:none; height:600px;" id="Div1">
</div>
I have the following code to try and access it in the page behind -
HtmlGenericControl getLargeDiv = (HtmlGenericControl)this.FindControl("Div1");
if (getLargeDiv != null)
{
getLargeDiv.Style.Add("display", "inherit");
}
Yet it seems to find Null everytime. I cant quite work it out. The div is sat within a panel, which does contain a runat="server" - this affecting it?
Thanks