Registering ASP.NET on IIS after installing the .NET Framework
Sometime it may happens that you have installed asp.net framework but you have not IIS installed in the computer, you installed IIS later. In this case you need to register IIS. very simple way to do.
Go to All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt and then write aspnet_regiis.exe -i
Configuring Default ASP.NET Version
We face versioning problem at the time of creating virtual directory in the computer where bot .NET 1.1 and .NET 2.0 is installed. Machine will use ASP.NET 1.1 for its default settings. But browsing the pages using this default configuration results in error page. So you need to change configuration to ASP.NET 2.0.
Go to Internet Information Services Manager -> Virtual Directory Properties -> ASP.NET Tab -> ASP.NET Version. In the dropdown box, change the version to 2.0.50727.
Use StringBuilder for String Concatenation
use StringBuilder at the time concatenate strings in a loop or when performing multiple concatenations. it will improve performance beacuse it creates fewer temporary objects and adds less memory pressure.
use StringBuilder sb = new StringBuilder(); sb.Append(“a”); sb.Append(“b”);
instead of String s = “a”; s+=”b”; //this will be slower
Use ASP.NET Literal instead of ASP.NET Label
Label put texts in span which is unnecessary and create complecacy in case of CSS. So better to user Litreral , most cases you will get same result using Literal instead of Label.
Use View State carefully for pages
ASP.NET save a lot data in hidden input field inside page which increase page load time. So be careful using View State if you do not need view state in your pages disable view state of your page writing that tag at the top of the page<%@ Page EnableViewState=”false” %>