You are on page 1of 1

Active Server Page WEB 5

- Console Application
o The console application is an application that run in console output window like C and
C++ program. The console application does not have graphical user interface
o The console application takes input and gives output at on command line output
- C# importance Points
o Console.ReadLine(): this method is used to read a string text from console windows
o Console.Write(): write the text at console windows in same line
o Console.WriteLine(): write the text at console window and add a new line character at the
end of the line
- Two ways we can comment code in ASP.NET
o Single Line Comment defined by //
o Multi Line comment defined by /* */
- How to use Session Object in ASP.NET C#
o The season used to store the session specific information for a web site
o The session object is used to store variable value on the same browser
o We generally use session for sending variable values from one web form to another web
from using Response.Redirect and Server.Transfer method
- How to use Context Object in ASP.NET C#
o The Context Object: is used to store the value and send it to the other page in ASP.NET
o The main difference between Context and Session is the Context Object will be null
when we send the page to server. That means we use Context Object we must use the
Server.Transfer Method to redirect user to other page.
- The difference between Response.Redirect() and Server.Transfer() In ASP.NET
o We can use response.redirect to send user to same server or another server
o Response.Redirect can be used both for aspx and html pages.
Response.Redirect(“meera.aspx”); / Response.Redirect(“meera.html”);
o In Response.Redirect the browser`s history is updated
o We can use the Server.Transfer to send user to same server web form, we can`t send
user to other server
o Server.transfer is only used for aspx pages it will not work for html pages
o In Server.Transfer the browser`s history is not updated

You might also like