Connexion English
09

Hi,

This small article will show you how to change the metadescription in dotnetnuke.

Simply add this code in your code behind page.

        Public ReadOnly Property BasePage() As DotNetNuke.Framework.CDefault

            Get

                Return DirectCast((Page), DotNetNuke.Framework.CDefault)

            End Get

        End Property
 
And then
 

        Private Sub Page_Init(ByVal sender As Object, ByValAs System.EventArgs) Handles Me.Init

BasePage.Description = “Your new description”
BasePage.Title = "Your page Title"

BasePage.KeyWords = “Your keywords”
BasePage.Author = "Your name"
BasePage.Comment = "Your Comment"

BasePage.Copyright = "Your Organization"

BasePage.Generator = "Your Generator"

        End Sub
 
 
 Francis
Posted in: Training
Actions: E-mail | Comments (7) RSS comment feed |

Post Rating

Comments

Rapid Share
11 janvier 2010 04:14
Excellent post! I always enjoy a solid technical post (and code) It saved me a good week+ - Keep up the good work!
giochi del casinò online
24 mars 2010 03:37
It helped me with ocean of knowledge so I really believe you will do much better in the future I appreciate everything you have added to my knowledge base .
giochi del casinò online
24 mars 2010 03:37
It helped me with ocean of knowledge so I really believe you will do much better in the future I appreciate everything you have added to my knowledge base .
Hotfile
14 mars 2011 05:28
I totally agree about the Description attribute. I foolishly went for some time before realising that setting Description... Doesn't actualy set the description meta tag - madness!

A slight deviation, I used description as a property of my master page.

public string Description
{
set
{
if (value.Length > 200)
{
throw new ArgumentException("Description too long.");
}
description.Attributes["content"] = value;
}
}
DNN Developer
12 mai 2011 00:39
thanks for post. Description is necessary for seo.
Sodium Hexametaphosphate
22 juillet 2011 04:13
Thank you very much delighted to see such an article. After reading great help to me.
BMW GT1
22 décembre 2011 02:10
very nice article,here a lot of good tool:aoto diagnostic tools

Post Comment

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above in the box below

DNNMTL articles by month-year

DNNMTL articles by categories