Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you access individual items of an Master Page

Answers were Sorted based on User's Feedback



How do you access individual items of an Master Page..

Answer / rakesh

Suppose we have a Label(lblTest) in the MasterPage(TestMaster.master) and you want to access that in the Content page at that time u can use the following Code.

Page_Load(....)
{
Label lbl = (Label)TestMaster.FindControl("lblTest");
lbl.Text ="Accessed in ContentPage..";
}

Is This Answer Correct ?    6 Yes 1 No

How do you access individual items of an Master Page..

Answer / vijay singh

MultiView mv =
(MultiView)Master.FindControl("Multiviewsidebar");

Is This Answer Correct ?    6 Yes 4 No

How do you access individual items of an Master Page..

Answer / kevin m

Best not to let the content page know about a control.

Expose what is needed by public properties on the master page, makes the solution far more flexible and decoupled.

Is This Answer Correct ?    2 Yes 1 No

How do you access individual items of an Master Page..

Answer / m.ramasubbareddy

There are so many ways to access individual items of an
Master Page

you need to typecast what control you need to find

1.TextBox textbox=(TextBox)this.findcontrol("textbox1");
2.Label labl=(Label)page.parent.fincotrol("lblname") as Label;
3.ContentPlaceholder
cph=(ContentPlaceholder)this.findcontrol("ContentPlaceholder1"
);
Label lbl=(Label)cph.findcontrol("lblname");

Is This Answer Correct ?    1 Yes 1 No

How do you access individual items of an Master Page..

Answer / prayag t

you can also have a public property defined in master pages
to be accessed in other child pages.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

What are the differences between clr & cts?

0 Answers  


difference between Trace and Debug ?

9 Answers   Accenture, Addlux, Microsoft,


Explain the difference between asp.net mvc and asp.net webforms

0 Answers  


What is Web Services?How we can consume a Web Services in our application?Explain.

1 Answers   Religare,


What is the mvc framework?

0 Answers  


Explain login control and form authentication.

0 Answers  


Describe the Server Control Events of ASP.NET?

0 Answers   SwanSoft Technologies,


For a webapplication if i want to gice access controls like admin,users how can i give security like rolebased?

2 Answers   CTS, Syncfusion,


What are the Application_Start and Session_Start subroutines used for?

5 Answers   Siebel Systems,


When cookie will expire?

0 Answers  


How does asp.net work?

0 Answers  


Rate yourself in .net and sql database?

1 Answers   BrickRed, Infosys, Satyam, SP Software,


Categories