Labels

Wednesday, July 4, 2007

Forgettable Facts

CLS is a subset of CTS:



--------------------------------------------------------------------

Shallow Copy: Chane in clone changes the original object

Deep copy: Does not change the orignial object

--------------------------------------------------------------------

A Process can contain multile AppDomains.

--------------------------------------------------------------------

Catch(Exception ex)

{

Throw vs throw ex;

}

Throw ex, is as good as creating a new exception. Hence does not maintain the stack trace. So use only ‘throw’ and not ‘throw ex’.

--------------------------------------------------------------------

Change in Web.config, removes the session from the Application Level. While Session.Abandon, removes the session from the User Level.

--------------------------------------------------------------------

Variables declared within try block cannot be accessed in catch & finally. Hence if u wish to dispose them in finally, declare them out of the try block.

--------------------------------------------------------------------

Data Caching:

· To disable the Absoluite & Sliding expiration, use : DateTime.MaxValue & TimeSpan.Zero

· Either one from two, Absolute & Sliding expiration can be used.

· Cache gets invalidate if either CacheDependency or Expiration, whichever happens first.

Worker Process:

ASP.NET on Windows 2000 and XP runs code within the "aspnet_wp.exe" worker process (when using IIS). On Windows 2003 it runs within the IIS6 "w3wp.exe" worker process.

--------------------------------------------------------------------

In C#, no arg constructor is not required in case parameterixed constructor is present.

--------------------------------------------------------------------

.Net 2005 – Grid

· In case of binding at design time or run time – Grid View kepts remember the binding in the View State. So in case of run time binding as well, do not require to rebind them again after page loads.

· But if the Viewstate is disabled then in case of design time binding it automatically calls the binding function. And in case of runtime code needs to do it programatically.

--------------------------------------------------------------------

Collections:

Collection can be tamper in ‘For’ loop, but cannot be in ‘For Each’ loop.

--------------------------------------------------------------------

User Controls:

- User Controls are loaded after ‘Page Load’

- Multiple User Controls are loaded in the order of their declaration within

tag, rather than

the order of their declaration at the top of the .aspx [<%@ Register ….. %&gt tag.

--------------------------------------------------------------------

Thanks & Regards,

Arun Manglick

SMTS || Microsoft Technology Practice || Bridgestone - Tyre Link || Persistent Systems || 3023-6258


No comments:

Post a Comment