0
votes

I am very new to ASP but I've been asked to look at our website and determine how we can add unique Description and Keyword meta tags to our ASP-based site. Currently, the site is using the same for every page, which is very bad for Google search results.

The code in one of the aspx pages says:

{<%@ Page MasterPageFile="~/Master/Default.Master" Language="c#" ContentType="text/html" CodeBehind="FundRaising.aspx.cs" AutoEventWireup="false" Inherits="Company.FundRaising" ValidateRequest="false" %> <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="cphContent">
    <div id="div-content" class="bgButterfly">
        <capris:StaticPage id="StaticPage1" runat="server" StaticPageId="11">No content available</capris:StaticPage>
    </div></asp:Content>}

(I replaced the name of the company with the word "Company" above.)

There is a file called Head.ascx that contains the generic meta tags now.

There are no .aspx.cs files in the directories, so it must have been pre-compiled into .dll files.

Without disturbing the functionality of the site, is there any way I can add unique description and keyword meta tags in the head of each page?

Thanks in advance.

2

2 Answers

1
votes

You can add a control to the main page, in every sub page/user control, you can search for that control in the main page.

e.g in master page (or other form)

<asp:Literal id="lcGoogleinfo" runat=server></asp:Literal>

in sub form:

Literal lcGoogleinfo= (Literal)Master.FindControl("lcGoogleinfo");
-1
votes

Do you mean meta descriptions and meta keywords? Meta keywords should not be added as they have been abused and are now not recommended by Google, Yahoo, or Microsoft. It's not clear if adding them negatively impacts page ranking, but it is widely believed that it does.

Here is a very helpful guide that shows you the html code and the asp equivalent including correct placement. http://www.asprobot.com/ASP.NET/ASPNET-Title-Tag-and-Meta-Tags