Murray Brown
asked on
ASP.net add meta description
Hi
I am trying to add a meta description to a page of my site using the following code in the page load but I can't see it in view-source:https://www.office2web.co.uk/microsoft-office-solutions. I also have added a meta title and that is easy to see
the source is as follows
I am trying to add a meta description to a page of my site using the following code in the page load but I can't see it in view-source:https://www.office2web.co.uk/microsoft-office-solutions. I also have added a meta title and that is easy to see
Public Class WebForm2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Page.Header.Controls.Add(New LiteralControl("<link rel='canonical' href='https://www.office2web.co.uk/microsoft-office-solutions' />"))
Me.Title = "Microsoft Office Specialist, Microsoft Office Courses Online - Office2Web"
Me.MetaDescription = "Find a Microsoft office specialist at Office2Web. We offer professional training for Microsoft office at the best cost. Check out Microsoft office online courses."
End Sub
End Class
the source is as follows
ASKER
yes I have a master page. The following line is what I am using. Is it correct?
Me.MetaDescription = "Find a Microsoft office specialist at Office2Web. We offer professional training for Microsoft office at the best cost. Check out Microsoft office online courses."
Me.MetaDescription = "Find a Microsoft office specialist at Office2Web. We offer professional training for Microsoft office at the best cost. Check out Microsoft office online courses."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do you have any master page?
are you setting page title there?
if yes, set the title in page_init event of master
and set it on page_load of regular pages