Archive for the ‘ Tutorials ’ Category

Asp.net Permalinks Using URL Rewriting

A Permalink is a permanent link which points to a particular blog entry or forum entry. For example the permalink for this blog article is http://csharp-codesamples.com/2009/03/aspnet-permalinks-using-url-rewriting.

This does not mean that a physical page is created for each blog entry. Instead a single page shows the data for multiple blogs articles dynamically based on some query string.

But all pages in asp.net end with a .aspx extension and if we pass a query string to the page it will look something like Page.aspx?query=test. These links are not very search engine friendly.

This article describes a simple method to create permalinks and improve your asp.net websites search engine optimization using URL rewriting without the use of custom handlers.

Read more

The Using Block

The using block provides proper declaration and dispose of objects that implement IDisposable interface. IDisposable is implemented by managed classes that access unmanaged resources. FileStream is one such classes that accesses IntPtr and SafeFileHandle which are unmanaged handles.

Read more