• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

Asp.Net Interview Questions Answers

Question - 71 : - How many classes can a single .NET DLL contain?

Answer - 71 : - It can contain many classes.

Question - 72 : - How do you create a permanent cookie?

Answer - 72 : -   Permanent cookies are available until a specified expiration date, and are stored on the hard disk.So Set the 'Expires' property any value greater than DataTime.MinValue with respect to the current datetime. If u want the cookie which never expires set its Expires property equal to DateTime.maxValue.

Question - 73 : - When during the page processing cycle is ViewState available?

Answer - 73 : - After the Init() and before the Page_Load(), or OnLoad() for a control.

Question - 74 : -   What are the Application_Start and Session_Start subroutines used for?

Answer - 74 : - This is where you can set the specific variables for the Application and Session objects. 

Question - 75 : - Is it possible to prevent a browser from caching an ASPX page?

Answer - 75 : -   Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cache property, as demonstrated here:           <%@ Page Language="C#" %>         <html>           <body>             <%               Response.Cache.SetNoStore ();               Response.Write (DateTime.Now.ToLongTimeString ());             %>           </body>         </html>  SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents caching of a Web page that shows the current time.

Question - 76 : - What data type does the RangeValidator control support?<

Answer - 76 : - Integer,String and Date.

Question - 77 : - Explain the differences between Server-side and Client-side code?

Answer - 77 : - Server-side code executes on the server.  Client-side code executes in the client's browser.

Question - 78 : - When during the page processing cycle is ViewState available?

Answer - 78 : - After the Init() and before the Page_Load(), or OnLoad() for a control.

Question - 79 : - What is the Global.asax used for?

Answer - 79 : - The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.

Question - 80 : - What is different b/w  webconfig.xml & Machineconfig.xml

Answer - 80 : -   Web.config & machine.config both are configuration files.Web.config contains settings specific to an application where as machine.config contains settings to a computer. The Configuration system first searches settings in machine.config file & then looks in application configuration  files.Web.config, can appear in multiple directories on an ASP.NET Web application server. Each Web.config file applies configuration settings to its own directory and all child directories below it. There is only Machine.config file on a web server. If I'm developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users? Use the state server or store the state in the database. This can be easily done through simple setting change in the web.config. <SESSIONSTATE StateConnectionString="tcpip=" sqlConnectionString="data source=; user id=sa; password=" cookieless="false" timeout="30" /> You can specify mode as “stateserver” or “sqlserver”. Where would you use an iHTTPModule, and what are the limitations of any approach you might take in implementing one "One of ASP.NET's most useful features is the extensibility of the HTTP pipeline, the path that data takes between client and server. You can use them to extend your ASP.NET applications by adding pre- and post-processing to each HTTP request coming into your application. For example Previous Next

Computer Contributors

Rajeev Katiyar
Yes Baroda

Share your email for latest updates


Our partners

Copyright 2017, All Rights Reserved. A Product Design BY CoreNet Web Technology