-
. I have label in my aspx page inside RadPanelItem:
<label id="lblPrtHrs" runat="server" for="lblTotalDays" style="margin-left:15px; color:#466D96; font-family:Verdana;">Partial Work Hrs:</label>
In the code behind I try to refer to that label like this:
((Label)infoPanel.FindItemByValue("personalInfo").FindControl("lblPrtHrs")).Visible = false;
But getting runtime error:
Error: Sys.WebForms.PageRequestManagerServerErrorException: Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.Label'.
Thanks so much for your help.