I am working on a asp website, where its organized by master-page-child page like. I like to change the title of the masterpage related to article on the page. how can this be achieved?
You can use this.Title property on every child pages to change the titles of that pages. this.Title ="My Title";
Two ways you can do it.. 1. Within the page_load event of the child page. place the code: Me.Title = "This is the title" Code (markup): 2. Can be declared at the top of the child page: <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="childpage.aspx.vb" Inherits="childpage" Title="This is the title" %>
hi, gotta problem. which i am working on is classic asp & actually master page is included at the last of the the child page like #include file="Templates/Master.asp" now i just have to make a variable that can be accessed to master.asp, then i will just print that value on title tag on master page. Please just help how to pass that variable ? or simply a defined variable in child.asp is accessible in master.asp?
maybe: #include file="Templates/Master.asp?title=Page title here" Then within the master.asp <head> <title><% Response.Write Request.QueryString("title") %></title> </head>