Iam tried to hide a div which is placed in master page,but i got an error like this "Object reference not set to an instance of an object".
My codes
<div runat="server" id="cnms">
<a href="Cinemas.aspx">Cinemas</a>
</div>
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AdminMaster admns = new AdminMaster();//This si my admin page
admns.FindControl("cnms").Visible = false;//I got error here
}
}
What went wrong for me?any solution?