General Tips and Tricks

Performance tips and tricks

Would like to bring some of the tips which either implemented or read here and there

Using Session
Set the session state off in web config and enable it at page level.

sessionState mode="Off"

This will let user to enable the session at page level. In general the
session would hinder the performance of the application however if
required make it Read only.

Pages enableSessionState="ReadOnly"

Using View State
Though view state is a good technique it consider to decrease the
performance hence it is good to set view state at control level
instead of page level.

<%@ Page Language="vb" AutoEventWireup="false" EnableViewState ="false" %/>

Enable At control level

< asp:TextBox ID="txtInput" runat="server" EnableViewState="true"/ >

3. Keeping the java script as reference even when they are small in size would gain performance.

< link href="../sample.js" type="text/javascript"/ >

4. Linking css as external file would give performance gain over inline coding.


< style >
font-family: Arial, Helvetica, sans-serif;
border: 0px solid #809EBA;
height: auto;

Instead of the above code we can use

< link href="../CSS/style.css" type="text/css" />


Author: sridhar.venaktaramanan08 Dec 2010 Member Level: Gold   Points : 1

In the above post i have some tags but they display when i edit but its not shown when its geting posted.

What i should do to post the code ?

Author: satyajee srivastava29 Dec 2010 Member Level: Silver   Points : 1

Hi sridhar.venaktaramanan

for the problems you have stated try to visit:-

1) given by mittu

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: