I wnat to make td to false and true on the master Page Load.
SOURCE CODE--Code:public partial class Templates_Deloitte : System.Web.UI.MasterPage { private bool m_LeftNavVisible = true; protected void Page_Load(object sender, EventArgs e) { this.tdTree1.Visible = NavVisible; this.divTree1.Visible = NavVisible; } public bool NavVisible { get { return this.m_LeftNavVisible; } set { this.m_LeftNavVisible = value; } }
I am getting the errorCode:<div id="divContent"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td runat="server" id="tdTree1" style="vertical-align: top; width: 0%; text-align: left;"> <div runat="server" id="divTree1" style="width: 250px; height: 600px; overflow: auto; padding: 0px; margin: 0px;" class="gradient"> </div> </td> </tr> </table> </div>
'Templates_Deloitte' does not contain a definition for 'tdTree1' and no extension method 'tdTree1' accepting a first argument of type 'Templates_Deloitte' could be found (are you missing a using directive or an assembly reference?)
When I run the Page & view source then
From the SOurce CodeCode:<div id="divContent"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td id="ctl00_tdTree1" style="vertical-align: top; width: 0%; text-align: left;"> <div id="ctl00_divTree1" style="width: 250px; height: 400px; overflow: auto; padding: 0px; margin: 0px;" class="gradient">
tdTree1 ---->ctl00_tdTree1
divTree1----> ctl00_divTree1
Can somebody tell me how to set visibility to True & False using Javascript on Master Page Load.




Reply With Quote