• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

Asp.Net Interview Questions Answers

Question - 11 : - What’s a bubbled event?

Answer - 11 : - When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.   Suppose you want a certain ASP.NET function executed on MouseOver for a certain button.  Where do you add an event handler? Add an OnMouseOver attribute to the button.  Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");

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

Answer - 12 : -   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 - 13 : - What are different types of directives in .NET?

Answer - 13 : -   @Page: Defines page-specific attributes used by the ASP.NET page parser and compiler.  Can       be included only in .aspx files <%@ Page AspCompat="TRUE" language="C#" %> @Control:Defines control-specific attributes used by the ASP.NET page parser and        compiler. Can be included only in .ascx files. <%@ Control Language="VB" EnableViewState="false" %> @Import: Explicitly imports a namespace into a page or user control. The Import         directive cannot have more than one namespace attribute. To import multiple     namespaces,     use multiple @Import directives. <% @ Import Namespace="System.web" %> @Implements: Indicates that the current page or user control implements the specified .NET      framework interface.<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %> @Register: Associates aliases with namespaces and class names for concise notation in   custom server control syntax.<%@ Register Tagprefix="Acme" Tagname="AdRotator" Src="AdRotator.ascx" %> @Assembly: Links an assembly to the current page during compilation,<span style="FONT-SIZE: 9pt;

Question - 14 : - How do I debug an ASP.NET application that wasn't written with Visual Studio.NET and that doesn't use code-behind?

Answer - 14 : - Start the DbgClr debugger that comes with the .NET Framework SDK, open the file containing      the code you want to debug, and set your breakpoints. Start the ASP.NET application. Go back to DbgClr, choose Debug Processes from the Tools menu, and select  aspnet_wp.exe from  the list of processes. (If aspnet_wp.exe do

Question - 15 : - What methods are fired during the page load? Init()

Answer - 15 : -  When the page is instantiated, Load() - when the page is loaded into server  memory,PreRender () - the brief moment before the page is displayed to the user  as HTML, Unload() - when page finishes loading.

Question - 16 : - What event handlers can I include in Global.asax?

Answer - 16 : -   Application_Start,Application_End, Application_AcquireRequestState, Application_AuthenticateRequest, Application_AuthorizeRequest, Application_BeginRequest, Application_Disposed,  Application_EndRequest, Application_Error, Application_PostRequestHandlerExecute, Application_PreRequestHandlerExecute, Application_PreSendRequestContent, Application_PreSendRequestHeaders, Application_ReleaseRequestState, Question - 17 : - What is view state?.where it stored?.can we disable it?

Answer - 17 : -   The web is state-less protocol, so the page gets instantiated, executed, rendered and then disposed on every round trip to the server. The developers code to add "statefulness" to the page by using Server-side storage for the state or posting the page to itself. When require to persist and read the data in control on webform, developer had to read the values and store them in hidden variable (in the form), which were then used to restore the values. With advent of .NET framework, ASP.NET came up with ViewState mechanism, which tracks the data values of server controls on ASP.NET webform. In effect,ViewState can be viewed as "hidden variable managed by ASP.NET framework!". When ASP.NET page is executed, data values from all server controls on page are collected and encoded as single string, which then assigned to page's hidden atrribute  "< input type=hidden >" Previous Next

Computer Contributors

krishan
Rajeev Katiyar
Yes Baroda

Share your email for latest updates

Name:
Email:

Our partners

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