• +91 9723535972
  • info@interviewmaterial.com

Asp.Net Interview Questions and Answers

Asp.Net Interview Questions and Answers

Question - 81 : - What is ViewState ? and how it is managed ?

Answer - 81 : -   ASP.NET ViewState is a new kind of state service that developers can use to track  UI state on a per-user basis. Internally it uses an an old Web programming trick-roundtripping  state in a hidden form field and bakes it right into the page-processing framework.It needs less code to write and maintain state in your Web-based forms.

Question - 82 : - What is web.config file ? 

Answer - 82 : -   Web.config file is the configuration file for the Asp.net web application. There is one web.config  file for one asp.net application which configures the particular application. Web.config file is  written in XML with specific tags having specific meanings.It includes databa which includes connections,Session States,Error Handling,Security etc. For example : < configuration >  < appSettings >     < add key="ConnectionString"          value="server=localhost;uid=sa;pwd=;database=MyDB" / >  < /appSettings > < /configuration >

Question - 83 : -  What is advantage of viewstate and what are benefits?

Answer - 83 : -   When a form is submitted in classic ASP, all form values are cleared. Suppose you have submitted a  form with a lot of information and the server comes back with an error. You will have to go back to  the form and correct the information. You click the back button, and what happens.......ALL form values are CLEARED, and you will have to start all over again! The site did not maintain your  ViewState.With ASP .NET, the form reappears in the browser window together with all form  values.This is because ASP .NET maintains your ViewState. The ViewState indicates the status of the  page when submitted to the server.

Question - 84 : -  What is validationsummary server control?where it is used?.

Answer - 84 : -   The ValidationSummary control allows you to summarize the error messages from all validation controls on a Web page in a single location. The summary can be displayed as a list, a bulleted list, or a single paragraph, based on the value of the DisplayMode property. The error message displayed in the ValidationSummary control for each validation control on the page is specified by the ErrorMessage property of each validation control. If the ErrorMessage property of the validation control is not set, no error message is displayed in the ValidationSummary control for that validation control. You can also specify a custom title in the heading section of the ValidationSummary control by setting the HeaderText property. You can control whether the ValidationSummary control is displayed or hidden by setting the ShowSummary property. The summary can also be displayed in a message box by setting the ShowMessageBox property to true.

Question - 85 : - What is the sequence of operation takes place when a page is loaded?

Answer - 85 : -   BeginTranaction  - only if the request is transacted Init    - every time a page is processed LoadViewState  - Only on postback ProcessPostData1  - Only on postback Load    - every time ProcessData2   - Only on Postback RaiseChangedEvent  - Only on Postback RaisePostBackEvent  - Only on Postback PreRender   - everytime BuildTraceTree  - only if tracing is enabled SaveViewState  - every time Render   - Everytime End Transaction  - only if the request is transacted Trace.EndRequest  - only when tracing is enabled UnloadRecursive  - Every request

Question - 86 : - Difference between asp and asp.net?.

Answer - 86 : -   "ASP (Active Server Pages) and ASP.NET are both server side technologies for building web sites and web applications, ASP.NET is Managed compiled code - asp is interpreted. and ASP.net is fully Object oriented. ASP.NET has been entirely re-architected to provide a highly productive programming experience based on the .NET Framework, and a robust infrastructure for building reliable and scalable web applications."

Question - 87 : -
Name the validation control available in asp.net?.

Answer - 87 : -   RequiredField, RangeValidator,RegularExpression,Custom validator,compare Validator

Question - 88 : - What are the various ways of securing a web site that could prevent from hacking etc ..

Answer - 88 : -   1) Authentication/Authorization 2) Encryption/Decryption 3) Maintaining web servers outside the corporate firewall. etc.,

Question - 89 : - What is the difference between in-proc and out-of-proc?

Answer - 89 : -   An inproc is one which runs in the same process area as that of the client giving tha advantage of speed but the disadvantage of stability becoz if it crashes it takes the client application also with it.Outproc is one which works outside the clients memory thus giving stability to the client, but we have to compromise a bit on speed.

Question - 90 : -  When you’re running a component within ASP.NET?.

Answer - 90 : -   On Windows 2003 (IIS 6.0) running in native mode, the component is running within the w3wp.exe process associated with the application pool which has been configured for the web application containing the component. On Windows 2003 in IIS 5.0 emulation mode, 2000, or XP, it's running within the IIS helper process whose name I do not remember, it being quite a while since I last used IIS 5.0.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners