How To Access Content From MasterPage in ASP.NET

So, you want to access some content from inside a page that you created from an existing master page?  The most clean way to do this is to create a public property in your master page, then access that.  In my case, I have a search button on a master page that I want to use from inside to pages that derive from that page.  So, Here is how I declare my master page: 1: <%@ Master Language="C#" MasterPageFile="~/MasterPages/MasterPage.Master" AutoEventWireup="true" 2: CodeBehind="ContactMasterPage.master.cs" Inherits="ThreePLogic.Web.ASPWeb.ContactPages.ContactMasterPage" %> 3:  4: <asp:Content ID="Content5" … Continue Reading


Get every new post delivered to your Inbox

Join other followers: