code_junkie

Using asp:content markup more than once in the masterpage

Nov 11th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <%@ Page Language="C#" MasterPageFile="~/default.master" Title="My Content Title" %>
  2.  
  3. <h1><%= this.Page.Title %></h3>
  4.  
  5. public void SetPageTitle(string title)
  6. {
  7. pageTitle.Text = title;
  8. sameTitle.Text = title;
  9. }
  10.  
  11. ((MyMasterPage) Master).SetPageTitle("My content page");
  12.  
  13. Master.SetPageTitle("My content page");
Add Comment
Please, Sign In to add comment