0

What is the difference between Server.Transfer and Response.redirect?

Category:

What is the difference between Server.Transfer and Response.redirect?


Server.Transfer() : this not only request the page, but also all the content of the requested page is transferred to Next page. Data can be persist across the pages using Context.Item collection, which is one of the best way to transfer data from one page to another keeping the page state alive.


Response.Redirect() :Context.Items loses the persistence when navigate to destination page. In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction.

0

What is the difference between Boxing and unboxing?

Category:

What is the difference between Boxing and unboxing?


Boxing: is converting value type to reference type.


Unboxing: is converting reference type to value type.

0

What is a base class of C#?

Category:

What is a base class of C#?


System.Object;

0

Difference between Interface and Abstract Class

Category:

Difference between Interface and Abstract Class

An abstract class is a class that cannot be instantiated but that can contain code.



An interface only contains method definitions but does not contain any code.

0

Difference between String vs. String builder

Category:

Difference between String vs. String builder


Once the string object is created, its length and content cannot be modified. This method is slower. Once the object is created, it can be able to modify length and content. This method is faster.

0

Difference between Ref vs. Out

Category:

The Ref and Out Parameters are quiet similar, both parameters are used to return back some value to the caller of the function. But there is a main difference between this two is when we use the out parameter, the program calling the function need not assign a value to the out parameter before making the call to the function. The same is not true for the reference (ref) type parameter. For a ref type parameter, the value to the parameter has to be assigned before calling the function. If we do not assign the value before calling the function we will get a compiler error.