0

Is there a way to reference an object from the Site.Master page from the inheriting page?

In other words, the Site.Master contains an object RadComboBoxDepartment. I want to reference it in the code behind of the page inheriting from Site.Master.

Scott
  • 165
  • 1
  • 3
  • 15

1 Answers1

0

Sure you can access your control in master page from the content page.

For example if you want to access the drop down list you can do it like this:

DropDownList dropDownFromMasterPage = (DropDownList)Master.FindControl("RadComboBoxDepartment");

And if you are using AJAX toolkit or Telerik Combo Box control, you can simply replace the type with that.

PS: Make sure your control has this attribute: runat="server"

Jamshaid K.
  • 3,555
  • 1
  • 27
  • 42