access master page user control from aspx page..

Posted by Gopal_nivas under ASP.NET on 1/4/2011 | Points: 10 | Views : 3979 | Status : [Member] | Replies : 0

i have a user control(ascx) and two masterpages(one and two)

in "two" master page i was inherited "one" master page".

in "two" master page i was called my user control.

in all pages i was inherited "two" master page only..

so i want to find the user control and hide tat control for some condition from my aspx page..

i was used this code

Control c = (Control)this.Master.FindControl("ss");//ss is the id of my user control

c.Visible = false;

it returns "null" value only..

how to hide/visible the user control of the master page..

need ur suggestions with example..



(No response found.)

Login to post response