Learning Curve…

Archive for October 2011

OutPut Cache in earlier versions of ASP.Net has a limitation – generated content always has to be stored in memory, and on servers that are experiencing heavy traffic, the memory consumed by output caching can compete with memory demands from other portions of a Web application.

ASP.NET 4 adds an extensibility point to output caching that enables you to configure one or more custom output-cache providers. Output-cache providers can use any storage mechanism to persist HTML content. This makes it possible to create custom output-cache providers for diverse persistence mechanisms, which can include local or remote disks, cloud storage, and distributed cache engines.

Create a custom output-cache provider as a class that derives from the new System.Web.Caching.OutputCacheProvider type. You can then configure the provider in the Web.config file by using the new providers subsection of the outputCache element, as shown below:

 <caching> <outputCache defaultProvider="AspNetInternalProvider">
 <providers> <add name="DiskCache" 
type= "Test.OutputCacheEx.DiskOutputCacheProvider, 
DiskCacheProvider"/> </providers> </outputCache> </caching>

Then specify the newly created and configured custom cache provider as below:

<%@ OutputCache Duration="60" VaryByParam="None" providerName="DiskCache" %>

In ASP.NET 4, Web server controls include a ViewStateMode property that lets you disable view state by default and then enable it only for the controls that require it in the page.
The ViewStateMode property takes an enumeration that has three values: Enabled, Disabled, and Inherit. Enabled enables view state for that control and for any child controls that are set to Inherit or that have nothing set.

Disabled disables view state, and Inherit specifies that the control uses the ViewStateMode setting from the parent control.


ASP.Net 4.0 introduced a new URL redirection method RedirectPermanent() which avoids round trips.
You can implement this as shown below:

RedirectPermanent(“/newpath/newpage.aspx”);

In ASP.NET 4 FormView and on a few of the Login controls having RenderOuterTable property . When you set this property to True (it defaults to False so you need to set it explicitly) the control doesn’t generate a wrapping HTML <table> element. This in turn results in less code and cleaner HTML.

In ASP.NET 4, list controls have been extended with a ClientIDRowSuffix property that enables you to indicate the column whose value is used to create unique client-side IDs based on data in the database. For this to work, you need to set the ClientIDMode property.

tinyint  :- Used to store integer numbers ranging from 0 to 255.
smallint :- Used to store integer numbers ranging from –32,768 to 32,767.
int :- Used to store integer numbers ranging from –2,147,483,648 to 2,147,483,647.
bigint :- Used to store large integer numbers ranging from –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

Question: Where’s global assembly cache located on the system?
Answer
: Usually C:\winnt\assembly or C:\windows\assembly.


Author

Learning days (Calendar)

October 2011
M T W T F S S
« Sep   Nov »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Knowledge Bank (Archives)

I am on Twitter

Blog Stats

  • 498,681 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: