Skip to main content

Top 100 Dot Net Interview Questions - Part 10

91. How many types of Cookies are available in ASP.NET?

There are two types of Cookies available in ASP.NET:

  • Session Cookie - Resides on the client machine for a single session until the user does not log out.
  • Persistent Cookie - Resides on a user's machine for a period specified for its expiry, such as 10 days, one month, and never.

The user can set this period manually.

92. What is the use of the Global.asax file?

The Global.asax file executes application-level events and sets application-level variables.

93. What are the Culture and UICulture values?

The Culture value determines the functions, such as Date and Currency, which are used to format data and numbers in a Web page. The UICulture value determines the resources, such as strings or images, which are loaded for a Web page in a Web application.

94. What is the difference between ASP session and ASP.NET session?

ASP does not support cookie-less sessions; whereas, ASP.NET does. In addition, the ASP.NET session can span across multiple servers.

95. Which control will you use to ensure that the values in two different controls match?

You should use the CompareValidator control to ensure that the values in two different controls match.

96. What is the difference between a page theme and a global theme?

A page theme is stored inside a subfolder of the App_Themes folder of a project and applied to individual Web pages of that project. Global themes are stored inside the Themes folder on a Web server and apply to all the Web applications on the Web server.

97. What do you mean by a neutral culture?

When you specify a language but do not specify the associated country through a culture, the culture is called as a neutral culture.

98. What is the use of the <sessionState> tag in the web.config file?

The <sessionState> tag is used to configure the session state features. To change the default timeout, which is 20 minutes, you have to add the following code snippet to the web.config file of an application:<sessionState timeout="40"/>

99. Can you post and access view state in another application?

Yes, you can post and access a view state in other applications. However, while posting a view state in another application, the PreviousPage property returns null.

100. Which method do you use to kill explicitly a users session?

The Session.Abandon() method kills the user session explicitly.

Comments

Popular posts from this blog

Top 100 Dot Net Interview Questions - Part 1

1. What is ASP? Active Server Pages (ASP), also known as Classic ASP, is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages. It uses different scripting languages to create dynamic Web pages, which can be run on any type of browser. The Web pages are built by using either VBScript or JavaScript and these Web pages have access to the same services as Windows application, including ADO (ActiveX Data Objects) for database access, SMTP (Simple Mail Transfer Protocol) for e-mail, and the entire COM (Component Object Model) structure used in the Windows environment. ASP is implemented through a dynamic-link library (asp.dll) that is called by the IIS server when a Web page is requested from the server. 2. What is ASP.NET? ASP.NET is a specification developed by Micro

Top 100 Dot Net Interview Questions - Part 3

21. What is Query String? What are its advantages and limitations? The Query String helps in sending the page information to the server. The Query String has the following advantages: Every browser works with Query Strings. It does not require server resources and so does not exert any kind of burden on the server. The following are the limitations of Query String: Information must be within the limit because URL does not support many characters. Information is clearly visible to the user, which leads to security threats. 22. What is actually returned from