Asp.Net

Introducation To ASP.Net
Difference between Response.Redirect and Server.Transfer
What are Session state modes in ASP.NET ?
What is cross site scripting? (XSS)

Q. What is ViewState?
====================================================================Ans:
View state is the method that the ASP.NET page framework uses to preserve page and control values between round trips. When the HTML markup for the page is rendered, the current state of the page and values that must be retained during postback are serialized into base64-encoded strings.
---------------------------------------------------------------------------------
Q.Name of method tha used to force all the validation controls to run?
====================================================================Ans:
Page.Validate() method
---------------------------------------------------------------------------------
Q.difference between Response.Write() and Response.Output.Write() methods?
====================================================================Ans:
Response.write() don't give formatted output. The latter one allows you to write formatted output.

Response.write - it writes the text stream Response.output.write - it writes the HTTP Output Stream.
---------------------------------------------------------------------------------
Q.What is a Cookie?
====================================================================Ans:
A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.

Q. How to Create a Cookie?
====================================================================Ans:
HttpCookie TestCookies = new HttpCookie("TestCookies");
StudentCookies.Value = "HI dileep How R u?";
StudentCookies.Expires = DateTime.Now.AddHours(1);
Response.Cookies.Add(TestCookies);
---------------------------------------------------------------------------------
Q. How to Retrieve a Cookie Value?
====================================================================Ans:
The "Request.Cookies" command is used to retrieve a cookie value.
string roll = Request.Cookies["TestCookies"].Value; 
==========================
Many More Coming Soon.....

No comments: