Which code segment should you use?

You create a master page named PageBase.master. The master page contains a Label control named lblTitle. You create a content page that references the master page. You need to change the Text property of the master page’s lblTitle control from the content page. Which code segment should you use?

You create a master page named PageBase.master. The master page contains a Label control named lblTitle. You create a content page that references the master page. You need to change the Text property of the master page’s lblTitle control from the content page. Which code segment should you use?

A.
Label lblTitle=(Label)Master.FindControl("lblTitle"); lblTitle.Text="Articles";

B.
Label lblTitle=(Label)Parent.FindControl("lblTitle"); lblTitle.Text="Articles";

C.
Master.Page.Title="Articles";

D.
((Label)Page.FindControl("lblTItle")).Text="Articles";



Leave a Reply 0

Your email address will not be published. Required fields are marked *