Вы находитесь на странице: 1из 1

Dim metaDescription As New HtmlMeta

Dim MetaCount As Integer = ad.Description.Length


Me.Page.Title = " For Rent " + StrConv(ad.Title, vbProperCase) + ", "
metaDescription.Name = "description"
If MetaCount <= 150 Then
metaDescription.Content = ad.Description
Else
metaDescription.Content = ad.Description.ToString().Substring(0, 150)
End If
Page.Header.Controls.Add(metaDescription)
That should work.
As you can see I even included code to limit the description characters to 150 c
haracters.

Вам также может понравиться