This project is read-only.

SEO Extension released

Topics: Developer Forum, Project Management Forum, User Forum
Jan 5, 2008 at 5:29 PM
Edited Jan 5, 2008 at 5:30 PM
I wrote a bunch of code and create a SEO Extension to let manage the meta tag description and meta tag keuwords for every single page.
You can find the SEO Extension for MWPSK at http://code.web-ma.com/aspnet-mwpsk-seoextension.

Enjoy the code, and don't forget to post comments or bugs.
Feb 22, 2008 at 6:47 PM
public static HtmlMeta generateMeta(string name, string content)
{
HtmlMeta meta = new HtmlMeta();
meta.Name = name;
meta.Content = content;
return meta;
}
lack of HtmlMeta
Feb 23, 2008 at 9:38 AM
@Hazardvn: what do you mean with lack of HtmlMeta? It's a static function made to add description and kewyords tags into the web page. What's your problem?
Feb 27, 2008 at 5:43 PM
@moroandrea

This is a great extension, thanks for posting. I think I understand what hazardvn's rather cryptic post means. I copied your modified files into a fresh copy of 1.1.4 and got the following build error in VWD 2005 Express:

The type or namespace name 'HtmlMeta' could not be found (are you missing a using directive or an assembly reference?)

I added the following to WebPage.cs and and it started working:

using System.Web.UI.HtmlControls;

I'm not a coder, and the only reason I knew to add that namespace is because it was recommended by VWD. Hope this helps, and if there is a different namespace to be used, please let me know. Also, might want to add this to the to the file on your website. Thanks again, and keep up the good work.

Also, any idea if this is going to be added to the code in the next version of the kit? If not, it should be!
Feb 28, 2008 at 7:56 AM
@CarlCarson

Carl, thanks to bring my attention the problem. This certainly has happened because using Reshaper I probably clicked on the link to automatically add the reference and I didn't remember to add to the code file distributed.
I will change it immediately.

About the integration, it won't depend on me, but I contacted the MS team who has developed MWPSK and they said me that they will evaluate this extension for future merging. So we can only hope this will happen.
Feb 29, 2008 at 7:04 AM
i am having the same problem as carlcarson, and even though i added the additional line into webpage.cs, i still have the same exact error...?
Feb 29, 2008 at 8:36 AM
@morgankhalil
It sounds strange that you got the same exact error. System.Web.UI.HtmlControls depends on System.Web project reference. It should be referenced by default. Isn't it?
Feb 29, 2008 at 11:25 PM
ok i have it working now, i really dont know what i did to make it work, maybe just copying over each file individually and checking the status, i dont know. thanks for this great extension, one of the reasons why i am using mwpsk was because of the meta tag options and the url rewrite options, so this extension just adds to those awesome features!
Mar 1, 2008 at 10:49 AM
@morganikgalil
I'm glad to hear that all is working now. Enjoy with the extension and feel free to report anything it's missing.
Mar 6, 2008 at 1:17 AM
small suggestion: i was getting really frustrated that the text boxes were so small, considering that most descriptions and sets of keywords are more than 15 characters, so i changed mine to multi-line and 100% width so i could actually see the whole thing.
Mar 6, 2008 at 8:02 AM
@morgankhalil
Yes, it sounds reasonable.
Please post your changes to the community, so other user can share the same solution. With a bit of spare time I will updated my solution too.
Mar 6, 2008 at 8:50 AM
in administration/navigation.aspx i changed this:

<tr>
<td class="fieldlabel">
<asp:Localize runat="server" Text="<%$ Resources:stringsRes, admNavigationDescription%>" />
</td>
<td class="field">
<asp:TextBox runat="server" ID="txtDescription" />
</td>
</tr>
<tr>
<td class="fieldlabel">
<asp:Localize runat="server" Text="<%$ Resources:stringsRes, admNavigationKeywords%>" />
</td>
<td class="field">
<asp:TextBox runat="server" ID="txtKeywords" />
</td>
</tr>

to this:

<tr>
<td class="fieldlabel">
<asp:Localize runat="server" Text="<%$ Resources:stringsRes, admNavigationDescription%>" />
</td>
<td class="field">
<asp:TextBox runat="server" ID="txtDescription" Height="100px" TextMode="MultiLine" Width="100%"/>
</td>
</tr>
<tr>
<td class="fieldlabel">
<asp:Localize runat="server" Text="<%$ Resources:stringsRes, admNavigationKeywords%>" />
</td>
<td class="field">
<asp:TextBox runat="server" ID="txtKeywords" Height="100px" TextMode="MultiLine" Width="100%"/>
</td>
</tr>