Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

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

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

Open in new window



the source is as follows

Open in new window

Avatar of HainKurt
HainKurt
Flag of Canada image

I see link...
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

User generated image

Avatar of Murray Brown

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." 

ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial