Archive for the 'Tutorials' Category

How to encrypt a query string ?

Few months back I had used a nice component from TSHAK to encrypt query strings. it requires just one line of code to encrypt a query string. Right now I am unable to find the exact page at TSHAK where I got the control. Due to a site re organization at TSHAK , they might [...]

Loading and previewing fonts from files in ASP.NET

Few weeks back I created a free fonts preview and download site www.freedownloadablefonts.net. There are around 6000 fonts in .ttf files and I needed to display a preview of the fonts. All the fonts were copied to a folder “~/Fonts”. Then I created a http handler “GetFontImage.ashx” to which the font path and text [...]

Fixing postbacks while using URLRewriter.net

Last week I had done a post on how to rewrite URLs using the URLRewriter.Net component. You can read it here . Another issue that comes up while using URL rewriting in ASP.NET is the problem of postbacks. Whenever a postback occurs in the page, you find that after the postback the URL in the [...]

Caching a dataset for improving performance in ASP.NET

In a website that I recently completed www.Christian-Jokes.net the left navigation bar listed the categories of jokes from the database. So on every page load I was querying the database to load the categories. Obviously this was a bad idea. I needed to cache the categories in memory without querying the database on every page [...]

URL Rewriting in ASP.NET using URLRewriter.Net

Friendly URLs have become necessary to obtain better rankings in Search engines. The improvement in rankings may not be huge but because of the burgeoning of websites in almost every niche we need to use every single advantage that we can get. Friendly URLs are URLS without a query sting or without the “?” character. [...]

Basic SEO tips

Here are a few basic tips for on page search engine optimisation that i try to implement in all my websites.
1. The page title gets top priority. It should be short. Only your main keywords should be in the title. Eliminated all unwanted words. Replace the word “and” with | so that you can save [...]

Using MySQL in ASP.NET

Most web hosts provide more mySQL databases than SQl Server 2005 database. To keep your hosting costs low , you might need to use MySQL in your projects.
To connect to MySQL database
First download the drivers here
Then copy MySql.Data .dll and MySql.Web.dll to your bin directory
The connection string is as follows

<add name=”ASPNETDBConnectionString” connectionString = “Server=localhost;User [...]