tekar
tekar

Reputation: 93

asp.net c# Different title for each Webform while using Masterpage

i just uploaded my site and everything works great, however. i just realised that no matter where i am on my website, it allways display the same title ("thiswebsite.com" etc, if i didnt enter any title on the master page) and if i DO enter a title on the master page then, of course. It only show's said title. no matter which page im on. So, how do i for each webform, have a different title for said page? i have never actually done this before.

This is my current masterpage "head"

<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'/>
    <link href="StyleSheet.css" rel="stylesheet" />


</head>

And this is a Random webform from the same project

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="omos.aspx.cs" Inherits="omos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>

nothing special here as you can see, just a normal head when using Bootstrap, and one of my webforms. I emptied the contentplaceholder for all my content to make it easier to read. if you need more information to answer the question please let me know.

Tekar

Upvotes: 0

Views: 389

Answers (1)

tekar
tekar

Reputation: 93

the second i press ask question i now realise you can change the title on the top of the web form, at " <%@ Page Title="" Language="C#" " really didnt notice it untill now. sorry about this !

Upvotes: 1

Related Questions