Caching is technique of persisting the data in memory for immediate access to requesting program calls.Caching is feature to improve application performance of web application.There are three types of caching available in asp.net.
Output Caching :
This is at the page level and one of the easiest way of caching a page.
<%@ OutputCache Duration="60"...
Tuesday, January 21, 2014
Types of session management in ASP.NET
Session object is used to store state specific information per user basis.Session object can be configured 3 ways based on availability and scalability of web application.
In Process Mode:
This is default mode and useful for small application which is hosted on single server.
Advantages:
-Fastest mode.
-Simple configuration.
Disadvantages:
-Session...
Monday, January 20, 2014
Difference between Server.Transfer and Response.Redirect
Server.Transfer transfer page processing from one page to another page directory to the next page without
making a round trip back to the client browser.This provides a faster response with a little less overhead on the server.Server.Transfer does not update the url.
Response.Redirect is used to redirect the user browser to another page or website.This...
What are the differences between user control and server control
User Control
1.Re-usability in web pages
2.Can not add to toolbox
3.Drag and drop from solution explorer to page
3.You can register user control to .aspx page by Register tag
4.This is good for static layout
5.Easier to create
6.Can not compiled into DLL
7.Can not use in other web application.
Custom Control
1.It can be compile into DLL.
2.Re-usability...
How to fetch ricord between 3 and 15 only, if a dataset contains 100 rows
SqlDataAdapter da = new SqlDataAdapter("usp_GetData",con);
DataSet ds1 = new DataSet();
da.Fill(ds1);
int rowcount = ds1.Table[0].Rows.Count;
if(rowcount >=15)
{
for(int i=3;i<=15;i++)
{
lbl.Text = Convert.ToSting(ds1.Table[0].Row[i].ToString());
}
} ...
Sunday, January 19, 2014
What is Viewstate ? What are the advantages and disadvantages of it view state?
View state is used to retain the state of the server side objects between post backs.
Advantages :
-Simple for page level data
-Encrypted
-Can be set at the control level.
Disadvantages :
-Overhead in encoding view state values
-Makes a page heav...
What is diffgram
The Diffgram is one of the two XML format that you can use to render Dataset object content to XML.For example if you are reading database data to on XML file to be sent to a web service...
Monday, January 13, 2014
Some basic linq to object query example.
Here code sample uses where clause to find all elements of an array which is less than 4.
public void Sample1()
{
int[] num = { 8, 2, 4, 1, 5, 0, 2, 6, 7, 9 };
var objNum = from n in num
where n < 4
select n;
Console.WriteLine("Numbers < 4:");
...
LINQ
What is LINQ?
LINQ stand for Language-Integrated Query. It is new feature introduce in Visual Studio 2008. It has powerful query capabilities to querying on any source of data, data could be sql server database, oracle, collection of objects or xml files. Visual Studio includes LINQ provider assemblies that enable to querying with as given three...
Wednesday, January 1, 2014
What is Post Back ?
Postback is the process of by which the browser sends information back to the server so that server can handle the event.The server executes the code sends the resulting HTML back to the browser again.Postback occurs only with web forms that have the runat="server" attribute...
Difference between Exe and DLL
An exe can run independently where as dll will run within an exe.DLL is an in process file and exe is out process file...
Difference between DataReader and DataSet
-DataSet can represent an entire relational database in memory,completely with table relation and views.
-DataSet is a disconnected architecture while DataReader has live connection while reading data.
-If we want to Cache data and want to pass in different layer DataSet is the best thing to choose.
-DataSet support XML.
-When we need to access data...
What property must you set, and what method must you call in your code, in order to bind the data from some data source to the repeater control ?
We must set the DataSource property and call the DataBind() metho...
Can you edit data in Repeater control ?
No, Repeater control can reads the information from its data source.We can not edit with Repeater control...
Bindings in WCF
Below are different bindings available in WCF.
1.basicHttpBinding
2.WsHttpBinding
3.WsDualHttpBinding
4.WsFedrationhttpBinding
5.netTcpBinding
6.netNamedPipedBinding
7.netMsmqBinding
8.netPeerTcpBinding
9.msmqIntegrationBinding
10.basicHttpContextBinding
11.netTcpContextBinding
12.WebHttpBinding
13.WsHttpContextBinding
14.Ws2007FedrationHttpBindi...
Difference Between
Difference between Component and Services
A component is a piece of compiled code that can be assembled with other components to build applications.
A service is implemented by one or more component, and is a higher level aggregation....
Service Oriented Architecture (SOA)
Service Oriented Architecture(SOA) is a collection of well defined services. A service is an autonomous system that accepts one or more requests and returns one or more responses as a set of published and well defined interfaces.
Unlike traditional web service, tightly couples architectures SOA implements a set of loosely coupled services that collectively...
WCF
WCF is the latest service oriented technology Interoperability is the fundamental characteristics of WCF.Windows Communication Foundation is an SDK for building, configuring and deploying network-distributed services.WCF provides a runtime environment for services, enabling you to expose CLR types as services, and to consume other services as CLR...
What does the EnableViewState property do ?
EnableViewState stores the current state of the page and the objects in it like text,button,table etc.So this helps not loosing the state between client and server.It makes slow rendering on the browser so you should enable it only if required...