What are the Types of Caching in asp.net ? Explain with examples.

Saturday, July 18, 2009


There are 3 types of caching in asp.net , they are:
1. Output Caching
2. Fragment Caching
3. Data Caching

1. Output Caching:
This type of caching caches the dynamic output generated.

Ex:
<%@ outputcache duration="75" VaryByParam="none" %>

2. Fragment Caching
This type of caching caches the portion of the page generated.

Ex:
Here caching is done based on the user control CtrlCountries,

<%@ outputcache duration="90" VaryByControl="CtrlCountries" %>

3. Data Caching
This type of caching caches the data object programatically.
Ex:
In the below example dsEmp is a dataset.
Cache.Insert("EmployeeDetails", dsEmp, Nothing,DateTime.Now.AddMinutes(.5), TimeSpan.Zero)





www.codecollege.NET

What are the new Features in MOSS 2007?

Friday, July 17, 2009


1. Business Data Catalog
2. Document Management
3. Web Content Management
4. Office SharePoint Server 2007 Excel Services
5. InfoPath Forms Services
6. Enhanced Search
7. Enhanced User Profiles,etc
8. Single Sign-on


www.codecollege.NET

How will you prevent the browser from caching Aspx page?


You can do that by the following code,
<% Response.Cache.SetNoScore(); %>


www.codecollege.NET

What are the differences between Inline code and Code Behind Code?

















Sno
Inline
code
Code Behind
Code
1
Its
within .aspx file.
Its in a external class file.
2 Dynamically compiled.
Compiled prior to deployment and
linked with .aspx file.

what is a formatter in .net?


FOrmatter is an object that does encoding and serializing at one end and deserializing and decoding messages into data at the other end.
All formatters implement IFormatter interface.


Types:

1. Binary
2. SOAP
3. Custom



www.codecollege.NET

What are the differences between TypeOf() and GetType() ?

















Sno
TypeOf()
GetType()
1
Its an operator.
Its a method.
2 Can't be overloaded
Has lot of overloads.


www.codecollege.NET

What are the differences between Dll and Exe ?





















Sno
Dll
Exe
1 Objects of DLLs can be created Cant
2 In-Process Out-Process
3
Cant be started as a standalone.

Can
be.

Blog Widget by LinkWithin