Friday, December 22, 2006
disable debugging before placing your application into production
Dynamic Compilation
When you request an ASP.NET page, the ASP.NET Framework checks for a .NET class that corresponds to the page. If a corresponding class does not exist, the Framework automatically compiles the page into a new class and stores the compiled class (the assembly) in the Temporary ASP.NET Files folder located at the following path:
\WINDOWS\Microsoft.NET\Framework\[version]\Temporary ASP.NET Files
The next time anyone requests the same page in the future, the page is not compiled again. The previously compiled class is executed and the results are returned to the browser.
Even if you unplug your web server, move to Borneo for 3 years, and start up your web server again, the next time someone requests the same page, the page does not need to be re-compiled. The compiled class is preserved in the Temporary ASP.NET Files folder until the source code for your application is modified.
When the class is added to the Temporary ASP.NET Files folder, a file dependency is created between the class and the original ASP.NET page. If the ASP.NET page is modified in any way, the corresponding .NET class is automatically deleted. The next time someone requests the page, the Framework automatically compiles the modified page source into a new .NET class.
This process is called dynamic compilation. Dynamic compilation enables ASP.NET applications to support thousands of simultaneous users. Unlike an ASP Classic page, for example, an ASP.NET page does not need to be parsed and compiled each and every time it is requested. An ASP.NET page is compiled only when an application is modified.
Note
You can precompile an entire ASP.NET application by using the aspnet_compiler.exe command-line tool. If you precompile an application, users don't experience the compilation delay resulting from the first page request.
Control State
Handling Page Events
Init
InitComplete
PreLoad
Load
LoadComplete
PreRender
PreRenderComplete
SaveStateComplete
Unload
Overview of ASP.NET Controls
Validation Controls:RequiredFieldValidator
Rich Controls:banner advertisements,calendars,file upload buttons,multi-step wizards.
Data Controls:
Navigation Controls:tree views,bread crumb trails
Login Controls:change password,login,registration
Web Part Controls:
HTML Controls :
Namespace ASP.NET 2.0
Understanding Assemblies
Each class entry in the .NET Framework SDK documentation lists the assembly and namespace associated with the class. For example, if you look up the MessageQueue class in the documentation, you'll discover that this class is located in the System.Messaging namespace located in the System.Messaging.dll assembly.
Understanding web.config
Be aware that the file is an XML file and, therefore, all the tags contained in the file are case sensitive.
You can add a web configuration file to your application by selecting Website, Add New Item and selecting Web Configuration File
Send() Vs SendAsync()
Send() and SendAsync().
The Send method blocks further program execution until the send operation is completed.
The SendAsync() method, on the other hand, sends the email asynchronously.
Unlike the Send() method, the SendAsync() method does not wait to check whether the send operation was successful.