Below are the Steps you need to follow
1-
Create oen Content place holder on your master page with in HEAD section
<head id="Head_Demo" runat="server">
<asp:ContentPlaceHolder runat="server" id="Contentplace_Demo"> </asp:ContentPlaceHolder>
</head >
2 -
on Your Child page put this code :
<asp:Content runat="server" ContentPlaceHolderID="ContentHeaders" ID="Content_Demo" >
<META name="keywords" content="<%=pgKeywords%>">
<TITLE><%=pgTitle%></TITLE>
<META name="description" content="<%=pgDescription%>">
</asp:Content>
3 -
on content page's(Child page) open CodeBehind and Declare this :
Declare variables as below in the global declaration section
Protected pgKeywords As String = ""
Protected pgTitle As String = ""
Protected pgDescription As String = ""
4-
Now set the New title, Desc and all as per the your req. copy that code on page_load Event
pgKeywords = "keywords Content Goes here "
pgTitle = "title Content Goes here"
pgDescription = "Description Content Goes here"
or you can also refer this set mata tags
that's it
hope it will helps you
the problem with this is that you have to add this code to every child page and remember the variables names. What happens if you want to append text or forget to set the title. If you are interested I have an overrides page class that allows for appended title, description and meta data, prevents duplicate tags, and sets a default title based on a predefined value, and can add a canonical tag
ReplyDeletewht sort of overrides page class you have plz post some code
ReplyDeletethanx
I cannot post the code on your form so here is a link so you can download it.
ReplyDeletehttp://docs.google.com/Doc?docid=0ASgYkmErPYM5ZGRqdnA3dHFfNGRjNXpwZGRt&hl=en
thanx Jr_189
ReplyDeletethis is also very useful