3
Reply

Access a listitem of a master page form child page by id

Anilananda Chakrabortty

Anilananda Chakrabortty

Apr 18 2017 2:35 AM
216
I created a master page where i added a listitem , i,e ; 
<li ><a href="#" onclick="fProposal()" id="home" > Home </a> </li>
 
 
function fProposal() {
debugger;
document.getElementById("LookupId").href = "/Lookups/Lookups.aspx?Id=LookupId";
}
 
this in maste page with javascript 
 =======================??????????????===========================
Now i want to access this id form a child page and want to add the css proparty.
i did this one,
 
 =======================================================
string v = Request.QueryString["Id"]; 
// ContentPlaceHolder cph = (ContentPlaceHolder)this.Master.FindControl("ContentPlaceHolder1");
// HtmlControl li = (HtmlGenericControl)cph.FindControl(v);
// HtmlControl li = (HtmlGenericControl)FindControl("UpdatePanel1");
// li.Attributes.Add("class", "active");
//if (li != null)
// this.hide.style.Add("display", "none");
 
this is the child page where i want to change... 
 =============================================================
but it is completely error ...
can any one help me....plz ??? 
 

Answers (3)