20 Things You Can Do To Improve Your Blog’s Usability

Your blog’s usability – how would you define it? Would it be the ease with which your site operates, or would it be the ease of use of your product? Here’s how we define it; everything that works towards reducing your visitor’s frustration and helps enhance their overall experience is an example of good usability.

1. Take An Objective Look At Your Blog

Keep the following questions in mind: Does anything distract you from the content? Is there too much information, or too little? Do your pages feel overwhelming? Would you enjoy reading your posts again?

2. If It Isn’t Life Or Death, Eliminate It

Too many navigational links everywhere? Too Many Ads? Perhaps your sign-on form has too many fields? Chop everything you absolutely don’t need.

3. Make Your Content Clear And Legible

Don’t fill your content with unnecessary smileys, a string of hyphens, and other abbreviated animation characters or even tiny images every few lines. This only distracts the reader from the actual content.

4. Optimize White Space

Separate your content from the sidebar and navigation aspects using white space. Make sure there’s enough white space between, before and after lines, paragraphs, posts, lists, comments, page margins and so on.

5. Fine Tune Your Template

Scan your template for annoying negative contrasts such as black and white, even if you have it in small areas just for interest. Negative contrasts are extremely reader-unfriendly. Keep text black and the background light.

6. Categorize Content

Create categories for your content, so that users can easily navigate to the ones they want to read. Keep categories to a minimum and don’t define a category for less than 5 posts.

7. Use Keywords To Label Categories

Any user should understand your blog’s purpose just by reading your post categories. Use keywords from your niche to create category names, based on your SEO keyword research.

8. Add A Good Search Feature

It always helps to have a good search feature on your blog so that users, both old and new, can locate the content they want. Keep your search institutive and configure it with the right keyword combinations.

9. Include A Popular Posts Widget

New users find it very user-friendly when they’re presented with a list of popular posts. Keep the widget in your sidebar; base the recommended posts on your analytics results and not on a plugin algorithm.

10. Link Old Content To New

At the bottom of each new post, post links to older, related content that the user may like to read. This will ensure that users don’t need to go around searching for similar content.

11. Keep The Navigation Steady

Make sure that your navigation does not change as you keep adding new content. Write down how you want it to be and test your navigation now and then for conformance.

12. Keep Load Speeds High

Did you know that if there’s even a 0.5 seconds delay in your page-load time, you’re likely to lose 20% of your traffic? Drop whichever flashy feature is slowing your site down and focus on keeping your speed high.

13. Identify And Build Focus Around Target Audience

Once you know which niche you want to blog in, narrow the large audience scope to your focus target audience. Trying to serve too many audiences will cause confusion and mistrust among readers.

14. Modify Your Content Display

Use your Google Analytics data to check your average visitor’s preferred screen resolution. Design your user display size accordingly. For example, if 80% of your users use 1000px resolution, use that.

15. Check Your Site For Colorblind Compliance

Use Vischeck to find out what colors colorblind people see when they visit your blog. Are your regular colors appearing haphazard? Is your content clear to read? Modify your display colors after this study.

16. Keep Backgrounds Clean

If you must use background images for your content, make sure the text is still darker than the background image. Distracting background images reduce your site’s usability.

17. Keep Columns Narrow

If you’re presenting text or stats in columns, keep them narrow so that the visitor’s eye doesn’t have to travel too far across the page. Keep your columnar line length between 60 to 80 characters across browsers and screen resolutions.

18. Use Clean Fonts

Your fonts must be strong and easy to read, such as fonts from the sans-serif family - Courier New, Helvetica, Calibri and Times New Roman. Stick to a size 12 for best readability.

19. Ensure Browser Compatibility

Test your blog on multiple browsers – IE, Google Chrome, Firefox, Safari and a few others. Check that your web design works the same way on all the browsers. Remember users will leave your site if it doesn’t load well on their favorite browser.

20. Fix Broken Links

Nothing can be more frustrating than to click a link and find an error at the end of it. Use a tool such as LinkFixerPlus or LinkChecker to locate and fix broken links.

Also Read:
1. How to attract traffic to your blog
2. How to make money by your Blogs

About the author: Written by Raj for conversion rate optimization company Invesp. Invesp was founded in 2006 and helped more than 200 companies in optimizing their landing pages design and increasing conversion rate of their campaigns.

Export Datatable into csv

 

Introduction:

While working on .net projects you may get a situation where you need to export data into csv (Comma Separated Value) file format. There are so many ways of doing this and different programmers use to do it on different ways depending on situations and availability of data and resources they have.

Here I am going to share a simple function which will help you in exporting data from Datatable to csv file.

Prerequisite:

Before I share this function, I assumes that you already have data in Datatable.

C# Code:

#region Method : ConvertToCSV
private void ConvertToCSV(DataTable dt, string fileName, string delimiter)
{
    //prepare the output stream
    Response.Clear();
    Response.ContentType = "text/csv";
    Response.AppendHeader("Content-Disposition",
        string.Format("attachment; filename={0}", fileName));
    //write the csv column headers
    for (int i = 0; i < dt.Columns.Count; i++)
    {
        Response.Write(dt.Columns[i].ColumnName);
        Response.Write((i < dt.Columns.Count - 1) ? delimiter : Environment.NewLine);
    }

    //write the data
    foreach (DataRow row in dt.Rows)
    {
        for (int i = 0; i < dt.Columns.Count; i++)
        {
            string data = row[i].ToString();
            if (data.Contains("\""))
            {
                data = data.Replace("\"", "\"\"");
            }
            if (data.Contains("|"))
            {
                data = data.Replace("|", ", ");
            }
            if (data.Contains(","))
            {
                data = String.Format("\"{0}\"", data);
            }
            if (data.Contains(System.Environment.NewLine))
            {
                //data = String.Format("\"{0}\"", data);
                data = data.Replace(System.Environment.NewLine, " ");
            }
            Response.Write(data);
            Response.Write((i < dt.Columns.Count - 1) ? delimiter : Environment.NewLine);
        }
    }
     Response.End();
}
#endregion



This function takes three parameters a dt (Datatable) - which you want to export to csv file, filename - name of file in which you wants to save the file and a delimiter - which will be used to separate the values in this case a comma (,).

You can call this function as shown in below code:


ConvertToCSV(dt, "data.csv", ",");


I have tried to handle most of the cases like occurrence of double quotes ("),  comma in between the text which you may need to keep as it is and new line character.

I hope this will be helpful for you. Keep visiting and provide us with your feedback.

Get current page URL using JavaScript

Introduction

In our web application sometimes we require current page URL on client side, like when we share any script or perform any action according to the page name.

Here I am sharing the demo code to get the current page URL using JavaScript:

Code

var currentPageUrl = "";
if (typeof this.href === "undefined") {
currentPageUrl = document.location.toString().toLowerCase();
}
else {
  currentPageUrl = this.href.toString().toLowerCase();
}

This code also works with the pop ups.

C#.Net: Create CheckBoxList Dynamically (In Runtime)

This is how you can create CheckBoxList in run time in C#.Net.

aspx Code:

<asp:Panel ID="PnlControl" runat="server"> </asp:Panel>

C# Code:

CheckBoxList cd = new CheckBoxList();
cd.CssClass = "llcDynamicCheckbox";
cd.ID = "llcDynamicCheckbox";
cd.Font.Size = 8;
for (int i = 0; i < 5; i++)
{
  ListItem lt = new ListItem();
  lt.Text = "Checkbox " + i.ToString();
  lt.Value =
i.ToString();
  cd.Items.Insert(i, lt);
}
PnlControl.Controls.Add(cd);

Accordingly you can modify this code.

Create Checkbox using C#.Net dynamically

This is how you can create Checkbox dynamically in run time in C#.Net.

aspx Code:

<asp:Panel ID="PnlControl" runat="server"> </asp:Panel>

C# Code:

for (int i = 0; i < 10; i++)
 {
     CheckBox chkList1;
     chkList1 = new CheckBox();
     chkList1.Text = "CheckBox " + i.ToString();
     chkList1.ID = "Chk" + i.ToString();
     chkList1.Font.Name = "Verdana";
     chkList1.Font.Size = 9;
     PnlControl.Controls.Add(chkList1);
     PnlControl.Controls.Add(new LiteralControl("</br>
"));
 }


Accordingly you can modify this code.

SQL SERVER – FIX : Error 3154: The backup set holds a backup of a database other than the existing database

One of my friend came to me with this error just a few days ago while restoring the database:

Error 3154: The backup set holds a backup of a database other than the existing database.

Solution is very simple and not as difficult as we were thinking. He was trying to restore the database on another existing active database.

Fix/WorkAround/Solution:

1) Use WITH REPLACE while using the RESTORE command.
2) Delete the older database which is conflicting and restore again using RESTORE command.
I understand my solution is little different but I use it to fix my database issue successfully.
3) Sample Example :

RESTORE DATABASE [DB_Name]
FROM DISK = N'F:\ProdDBBackup\db_201305011837.SAFE_2.bak'
WITH REPLACE

Response.Redirect throws “Thread was being aborted”

Response.Redirect causes the browser to redirect to a different URL. It does so by sending a 302 – Object Moved to the browser, requesting it to do another roundtrip to the new page. Here is an example:

protected void Page_Load(object sender, EventArgs e)
{
  try
  {
   if (IsTrue)
      Response.Redirect(“http://www.harigeek.com”, true);
  }
  catch (Exception ex)
  {
    // All exceptions are caught and written
    // to a log file

  }
}

When doing the Response.Redirect, .net will automatically throw an System.Threading.ThreadAbortExcept when the redirect is called.

Cause:

Response.Redirect calls the the Response.End internally which ends the page execution and shifts the execution to the Application_EndRequest event in the application's event pipeline. The line of code that follows Response.End is not executed.

This problem occurs in the Response.Redirect and Server.Transfer methods because both methods call Response.End internally.

Resolution:

  1. For Response.End, call the HttpContext.Current.ApplicationInstance.CompleteRequest method instead of Response.End to bypass the code execution to the Application_EndRequest event.
  2. For Response.Redirect, use an overload, Response.Redirect(String url, bool endResponse) that passes false for the endResponse parameter to suppress the internal call to Response.End. For example:
                   
    Response.Redirect ("nextpage.aspx", false);
  3. For Server.Transfer, use the Server.Execute method instead.
  4. Filter the exceptions. Do nothing if the ThreadAbortException occurs:
     protected void Page_Load(object sender, EventArgs e)
    {
     try
      {
       if (IsTrue)
          Response.Redirect(“http://harigeek.com”, true);
      }
      catch (ThreadAbortException ex1)
      {
        // do nothing
      }
      catch (Exception ex2)
      {
       // All remaining exceptions are caught and written
       // to a log file

      }
    }

 
Designed and Maintained by