Posts Tagged ‘Web Development’

How-to: 301 Permanent Redirect with ASP.NET 4 – Response.RedirectPermanent()

Friday, July 9th, 2010 by Brent

During the process of migrating development over to the .NET 4 Framework there have been noticeable improvements.

One of the newest improvements is used quite often, Response.RedirectPermanent(). This new feature does a permanent redirection from a requested URL to a specified URL.

For a quick flashback to how this was previously completed review the code below:

/*
 * Previous 301 Permanent Redirect
 * */
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", "NewPage.aspx");

How you implement the new 301 Permanent Redirect is simply Response.RedirectPermanent(“URL-path-goes-here”). Here is an example with the new way with fewer lines of code.

/*
 * .NET 4 301 Permanent Redirect
 * */
Response.RedirectPermanent("NewPage.aspx");

By implementing 301 redirects it is a good practice to inform search engines that content has moved to a new location. Here are examples where Force 5 is involved with 301 redirects:

  • a web page that have moved
  • a Web page that has been removed
  • web page content that has been consolidated with another web page
  • non-www permanent redirect to the www (or vice versa)

How-to: Adding META Keywords & META Description with ASP.NET 4

Tuesday, July 6th, 2010 by Brent

In a previous post I showed how-to add specific page keywords & descriptions while using ASP.NET with Master Pages. Compared with the latest ASP.NET 4 version, this technique was not coder friendly.

In ASP.NET 4 adding page keywords and descriptions is as easy as this shown below.

    protected void Page_Load(object sender, EventArgs e)
    {
        // page keywords
        Page.MetaKeywords = "keywords go here...";
        // page description
        Page.MetaDescription = "description go here...";
    }

Overall, page keywords & descriptions are still important for SEO success along with page titles and page content. If you need any help with your website search rankings please feel free to contact Force 5 for some guidance.

Is Your Website Customer-Centric?

Friday, May 21st, 2010 by Force 5

In case you haven’t noticed the web is changing. There is a huge movement underway toward clean, simple, user friendly websites that promote productivity and, consumer interaction. The average consumer doesn’t care how creative a design team you have or, how technically advanced your development team is. They want information. Honest, peer driven information.

Whether a potential customer is at your site to buy a product, comment on your organization, read reviews, download a podcast or, read your latest blog entry, it’s your job to keep them interested and coming back. This is what customer-centric website design is all about.

So what is a customer-centric website?

Simple.  A customer-centric website focuses on your customers and what they want. Today’s online consumer is not interested in your company, products or services – they are interested in themselves. A customer-centric websites is structured so the customer can easily find what they want or get answers to their questions. By focusing your website on customer benefits and, ensuring a unique user experience, you will not only increase loyalty you’ll generate the much coveted word-of-mouth advertising; both key drivers of online sales.

There are a few basic steps you can take to get started on the road to a customer-centric website
• Clearly define your product or service and how customers will benefit from it
• Make sure your contact information is never more than a click away
• Clearly organized and easily navigable site content
• Place links in consistent locations and include them on every page
• Review your content for spelling and grammar mistakes
• Allow customer feedback on products, services and the site
• Make it easy for customers to get what they want
• Ask customers for a bare minimum of information to register or sign up
• Include in-depth, well written FAQ’s
• Make it easy for a customer to get support

A successful customer-centric website is created by meeting customers’ needs better than anyone else. If you focus every aspect of your website on meeting your customers’ needs you’re much more likely to remain a preferred provider. Remember, your customer is your best source of advertising. Give them what they want and they will tell the world.

Don’t get left behind.  Take the next step toward a true customer-centric website. Contact Force 5 today at 574-234-2060 or info@discoverforce5.com.

The little things to not forget about during development [Part: 2]

Friday, May 7th, 2010 by Brent

Sitemap.xml

What are Sitemaps and why are they important?

Sitemaps are a tool for developers to inform search engines about the website content that is available to be indexed. The sitemap protocol is made up of XML that contains a list of URLs, last modified dates, and page priorities for your website.

Here is a quick sample in simple form of a sitemap.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<urlset  xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9”>
  <url>
  <loc>http://www.discoverforce5.com/</loc>
  </url>
  <url>
  <loc>http://www.discoverforce5.com/About/</loc>
  </url>
</urlset>

For more information on sitemap protocol and XML tag definitions visit: http://www.sitemaps.org/protocol.php#xmlTagDefinitions

Below you will see two optional attributes available to include in your sitemap. The new attributes you see will be <changefreq> and <priority>. As stated within the sitemap documentation:

  • <changefreq> refers to how often a page is likely to change even though search engines may not crawl that often.
  • <priority> refers to the priority related to other links/URL’s within your site.
<?xml version="1.0" encoding="UTF-8"?>
<urlset  xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9”>
  <url>
  <loc>http://www.discoverforce5.com/</loc>
  <changefreq>monthly</changefreq>
  <priority>1.00</priority>
  </url>
  <url>
  <loc>http://www.discoverforce5.com/About/</loc>
  <changefreq>monthly</changefreq>
  <priority>0.80</priority>
  </url>
</urlset>

For more information about sitemaps and more advance information head over to www.sitemaps.org.

Next steps – Submitting your sitemap to the search engines

Each search engine is different in how they approach webmasters in submitting sites. Here is a list of locations to submit your sitemap.xml to search engines:

Tying in both the sitemap.xml with robots.txt

In part 1 of this series discussing robots.txt, you can declare the location of your sitemap.xml file for web crawlers/bots. Here is an example what a Robots.txt would look like:

User-agent: *
Allow: /
Sitemap: http://www.yourdomain.com/sitemap.xml

A quick refresher about the syntax above: “User-agent: *” is defining all bots and “Allow: /” is stating index all folders.

If you have multiple sitemaps you can declare them in your Robots.txt file. Here is an example in how to do so:

User-agent: *
Allow: /
Sitemap: http://www.yourdomain.com/sitemap-1.xml
Sitemap: http://www.yourdomain.com/sitemap-2.xml

In conclusion, having a sitemap.xml is not required for successful search engine indexing. Although, at Force 5 we believe it is beneficial when submitting your site to search engines that your site will be properly indexed. A great example is when a new site is going live where older pages may no longer exist in the same location. Even though search engines use other methods on indexing your site, using Sitemaps will in the end help the indexing process.

If you have any SEO needs or questions please give Force 5 a call.

Extreme Database Makeover

Wednesday, April 28th, 2010 by Force 5

Move…That…Database

Situation: Upgraded servers, so we needed to move database tables, views and stored procedures from a SQL Server 2005 machine to a SQL Server 2008 machine. We wanted to go through each table, view and stored procedure one by one in order to only move objects that are still in use. We needed a way to do that as accurately and quickly as possible.

Solution: We made use of the SQL Server Script Wizard. The Script Wizard generated the CREATE scripts for each object. We were able to either cut/paste and run the scripts we needed on the new server, or delete the scripts if we didn’t need them. This made the process seamless and straight-forward.

Details:

Accessing the Script Wizard

In SQL Server Management Studio right-click on a database. Go to Tasks > Generate Scripts… This will open up a wizard dialog box.

Using the Script Wizard

The first screen allows you to select the database you want to use. On this screen you can also fast-track to the finish by checking “Script all objects in the selected database”. This will create scripts for all Roles, Users, Schemas, Tables, Views and Stored Procedures. We won’t check that in this article, but that useful option is there if that is what you are trying to accomplish.

Choose Script Options

After you select your database and click Next you will come to an Options screen. We were able to use the default settings here. But there are some useful options to note.

  • Generate scripts for dependent objects(Default: False) – Use this to ensure dependent objects are also scripted for the objects that you select
  • Script Create(Default: True) - Cornerstone of this wizard. This enables creation of scripts for the objects you select.
  • Script Logins(Default: False) – Generates logins for the selected database
  • Script Object-Level Permissions(Default: False) – ***This is an important option*** Set this to True in order to generate the permission scripts (GRANT EXECUTE ON) if you are generating stored procedure scripts.
  • Script Data(Default: False) – Set to True if you want to script out INSERT statements for all data in selected tables.
  • Script Foreign Keys(Default: True) – Scripts foreign keys for tables selected
  • Script Primary Keys(Default: True) – Scripts primary keys for tables selected
  • Script Triggers(Default: False) – Scripts any triggers that are related to tables selected

Choose Object Types

This is where you select what object types you want to generate scripts for (Database roles, Schema, Stored procedures, Tables, Users, Views).

Following this you will be taken through screens for each object type you selected.  Here is where you select the specific objects whose scripts will be generated.

Output Option

Here you can either Script to a file, Script to Clipboard or Script to a New Query Window.  We scripted to a query window and that worked great.

Finished

Go to Finish and the wizard will generate the scripts that you selected.

Notes

The constraints and permission assignments are all located in the last section of the generated scripts.  This is to ensure that the objects have been created before trying to assign permissions to them.

MSDN Article: How to: Generate a Script

In Conclusion

This wizard is a powerful, yet simple tool that makes data migration more manageable.  Trying to do this task object by object would be very cumbersome and impractical.

If you are in need of any advice or have a data migration project that you need help with please feel free to contact us here at Force 5.

I Need a New Website – Now What Do I Do?

Wednesday, April 14th, 2010 by Force 5

You finally decide your company needs a new website, but you have no idea who to call. You check the yellow pages, Google web design, ask friends and family, and you’re still overwhelmed with all the choices. Who do you call when your brother-in-laws sisters boyfriend will do the job for $500. “We Are Web Sites”, the best web shop on the internet, will build your site for $2,000 and, “The Interactive Agency” down the street wants ten times that amount for a website and an integrated marketing campaign.

It doesn’t matter if you’re an online expert who knows all the new technology or you know about this “World Wide Web thingy” that’s kind of cool, picking a company to build your website can be a daunting task. In the following article I will explain some of the key differences between a web shop and an interactive agency and what you should expect from both.

Your Brother-in-Laws Sisters Boyfriend

Don’t do it! No really; don’t do this. After months of stress and frustration (because the basketball game with his buddies was more important than working on your site) you will end up with a website that looks like, well, you paid $500 to your brother-in-laws sisters boyfriend to build. Remember your website is the face of your company to millions of online people. Is this the image you want to portray?

The Web Shop

There are several different types of web shops. There is the design centric shop, the technology centric shop and the canned – just add your own copy and pictures and have an online presence today – type of shop. With the design centric shop your site will look great. It will portray exactly what the designer thinks of your company. With the technology centric shop your site will have all the bells and whistles whether you use them or not, and with the canned shop you will be forced to form your site around their cookie cutter solution.

No matter which of the three “web shop” solutions you choose there are several constants you can be sure of. Your business needs, determining who your consumer is and what they are looking for, search engine optimization, and your overall marketing plan will not be considered. Now, I’m not saying these are bad designers and programmers. They are probably great at what they do. What I am saying is that they either don’t have the time, desire, or knowledge to create the true online tool your business and your customers deserve.

The Interactive Agency

The interactive agency approaches websites as an extension of your entire marketing plan. They focus on your brand, and integrating your digital marketing campaigns into your overall marketing plan. The starting point for any interactive agency is learning who you are, learning your competition and, understanding your consumer. The second step is information design. Interactive agencies take what they learned in the first step and organize it in a way that creates straight forward navigation, and presents information on your website to best meet your consumer’s needs. This is the heart of a consumer centric website. For a detailed look at consumer centric websites watch for my next blog. Step three consists of the actual site design and build. Interactive agencies utilize a team of highly skilled designers and programmers to create your website. The design team creates an aesthetic, yet simple to use, look and feel focused on keeping the consumer engaged. The programming team takes into account consumer usability, accessibility and, search engine optimization. When complete your website will pass all validation testing, and will be well guarded against common hacking practices.

The job of the interactive agency doesn’t end with completion of your website. Your Website is only the beginning, the creation of what should become the backbone of your entire marketing plan. Now it’s time to look at, among other things, social media, pay per click campaigns, banner ads, email campaigns, product specific micro sites, personalized URL’s (PURLS) and, integration of digital marketing into traditional marketing efforts. The interactive agency is never far away. As your strategic partner they will routinely review, test and recommend upgrades to ensure it remains up to date, relative in search engine results and, in compliance with the latest best practice recommendations.

So now you understand that yes, anyone can build a website but to get the most out of your marketing efforts an interactive agency is the best solution. To find out how your business could benefit from using a full service interactive agency call Force 5 today at 574-234-2060 for send us an email at info@discoverforce5.com to schedule your discovery meeting.

The little things to not forget about during development [Part: 1]

Friday, March 19th, 2010 by Brent

Robots.txt – Telling bots where to go and where not to

What is the robots.txt and why is the robots.txt file important?

The robots.txt file is placed in the root folder of your website. This file instructs search engine bots what can and cannot be indexed. All you need to do is to define some criteria of what can be indexed and what cannot.

Examples:

Below you will see “User-agent: *” which is defining all bots and “Allow: /” is stating index all folders.

User-agent: *
Allow: /

Here is a direct opposite to not allow indexing for all bots.

User-agent: *
Disallow: /

Not allowing indexing for your whole website would probably not be recommended. Although there can be special situations where you would want to block all. For example, if you are working on a ‘beta’ website that you did not want to get index. This would be the situation to use if you were not using an authentication process on the beta site to be able to view the site.

A few years ago when bandwidth was costly I ended up having to create a special rule to block my portfolio image folder. In this example you will see how disallow a folder for all bots.

User-agent: *
Disallow: /images/

For more information regarding robots.txt here are a few resources worth checking out:

Lastly, it should be noted the robots.txt is merely a recommendation than absolute. Meaning a bot can totally ignore the robots.txt rules that you have laid out. So if you have any important content that you need to keep from being indexed, it is a best practice to put login credentials on the folder storing that content to keep it from the bots.

If you need help with your robots or SEO please feel free to give Force 5 a call.

Tutorial: How to add specific page keywords & descriptions while using ASP.NET Master Pages

Friday, October 23rd, 2009 by Brent

One of the most common questions that gets asked when starting out with ASP.NET Master Pages is how to add page specific keywords & descriptions.

For those not familiar with ASP.NET and/or Master Pages is that while using Master Pages the normal HTML tags including META tags are not part of individual pages. The individual ASP.NET pages only refer to content areas called, content place holders. The advantage of using Master Pages is that your site HTML template gets referenced in one area so you are able to make site wide changes to the Master Page instead of making the same changes to every individual web page within the site.

So to add either keywords or a description to your individual page you will need to create an HtmlMeta object as show below.

/* how to code */
protected void Page_Load(object sender, EventArgs e)
{
    // variables
    String sKeywords = String.Empty;
    String sDescription = String.Empty;
 
    // page keywords
    sKeywords = “Place your page keywords and phrases here.”;
 
    // page description
    sDescription = “Place your page description here.”;
 
    // meta tag keywords
    HtmlMeta mKeywords = new HtmlMeta();
    mKeywords.Name = “keywords”;
    mKeywords.Content = sKeywords;
    Header.Controls.Add(mKeywords);
 
    // meta tag description
    HtmlMeta mDescription = new HtmlMeta();
    mDescription.Name = “description”;
    mDescription.Content = sDescription;
    Header.Controls.Add(mDescription);
}