Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Find controls of master page on child page

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 224
    Comment on it

    We can easily fetch controls of master page on child page. Consider the following example:-

    In online shopping site you need to add or remove items which shows on master page based on added items in cart page (Cart page is a child page).

    Following is syntax to access the controls:-

     Label lblNumberofitems = this.Master.FindControl("lblNumberofitems") as Label;
    lblNumberofitems.Text = Convert.ToString(ShoppingCartAccess.ItemCount());
    

    I have find out a label of master page in above code and shows the total count of items in the label.

    Happy coding :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: