Server Error in '/' Application.

Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.TableCell'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.TableCell'.

Source Error:


Line 11: 		' Hide the leftmost column if it exists - TableCell ID="column1" 
Line 12: 		Dim tc As TableCell
Line 13: 		tc = mgutil.FindControlRecursive(Master, "column1")
Line 14: 		If tc IsNot Nothing Then
Line 15: 			tc.Visible = False

Source File: E:\web\caribbe1\Directory\ContactUsOnline.aspx.vb    Line: 13

Stack Trace:


[InvalidCastException: Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.TableCell'.]
   Directory_ContactUsOnline.Page_Load(Object sender, EventArgs e) in E:\web\caribbe1\Directory\ContactUsOnline.aspx.vb:13
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4676.0