Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increasing ASP.net WebForm Performance

When designing a ASP.net WebForm application what are some important steps to take (or hacks if you like to use the term) to ensure the best possible performance (in terms of speed, stability, and scalability)?

like image 868
jwarzech Avatar asked Dec 09 '08 17:12

jwarzech


3 Answers

Here's a good Best Practices written by microsoft. Chapter 6 is specific to ASP.NET, but the whole document is .NET in general.

  • http://msdn.microsoft.com/en-us/library/ms998530.aspx
like image 141
Ricardo Villamil Avatar answered Nov 10 '22 10:11

Ricardo Villamil


You've got a ton of material, directly from Microsoft here. Also a checklist is available if you want condensed information.

like image 27
Andrei Rînea Avatar answered Nov 10 '22 12:11

Andrei Rînea


Just a couple, in addition to the good advice already given,

  1. Don't put every single page in a webform, not everything needs it - The default behaviour from VS is to give you a master page that wraps a form around everything, and a lot of people seem to stick with that. In my experience, some controls can render 30% faster outside of a webform, so if you're just parsing a querystring then reading something from a database, leave the form at home if you can. Even getting your navigation out of the form will help.
  2. Don't use a server control when plain old HTML will do - does it really require a asp:linkbutton or asp:hyperlink just to go to the FAQ page etc. Plain hyperlinks work just fine in asp.net, but some people seem to get stuck on the idea of using runat="server" for everything.
like image 5
seanb Avatar answered Nov 10 '22 12:11

seanb