Click here to Skip to main content
Email Password   helpLost your password?
Title:        ASP.NET
Author:      Shivprasad Koirala 
Email:       shiv_koirala@yahoo.com
Language:    ASP.NET
Level:       Beginner
Description: .Net Interview Questions 4th Edition

ASP. NET


(B) What’ is the sequence in which ASP.NET events are processed?

(B) In which event are the controls fully loaded?

(B) How does ASP.NET maintain state in between subsequent request?

(A) What is event bubbling?

(B) How do we assign page specific attributes?

(A) How do we ensure view state is not tampered?

(B) What is the use of @ Register directives?

(B) What is the use of Smart Navigation property?

(B) What is AppSetting Section in “Web.Config” file?

(B) Where is View State information stored?

(I) what is the use of @ Output Cache directive in ASP.NET.

(B) How can we create custom controls in ASP.NET?

(B) How many types of validation controls are provided by ASP.NET?

(B) Can you explain “AutoPostBack”?

(B) How can you enable automatic paging in Data Grid?

(B) What is the use of “GLOBAL.ASAX” file?

(B) What is the difference between “Web.config” and “Machine.Config”?

(B) What is a SESSION and APPLICATION object?

Introduction

In this section we will touch base on one of important concepts in ASP. Net. You can download my .NET Interview Question PDF from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip .

I have also put all these design patterns in a video format and uploaded on http://www.questpond.com/FreeDesign1.htm . You can visit http://www.questpond.com and download the complete architecture interview questions PDF which covers SOA , UML , Design patterns , Togaf , OOPs etc.

You can download the software architecture interview questions PDF

Download Software Architecture Interview Questions

Previous parts of my Interview questions series for Architects

Part 1 - SoftArchInter1.aspx

Part 2 - SoftArch2.aspx

Part 3 - SoftArch3.aspx

Part 4 - SoftArch4.aspx

UML interview questions part 1 SoftArch5.aspx

Happy job hunting......

(B) What’ is the sequence in which ASP.NET events are processed?

Following is the sequence in which the events occur:-
• Page_Init.
• Page Load.
• Control events
• Page- Unload event.
Page_init event only occurs when first time the page is started, but Page Load occurs in subsequent request of the page.

(B) In which event are the controls fully loaded?


Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event.5
(B) How can we identify that the Page is Post Back?
Page object has an “IsPostBack” property, which can be checked to know that is the page posted back.

(B) How does ASP.NET maintain state in between subsequent request?


Refer caching chapter.

(A) What is event bubbling?


Server controls like Data grid, Data List, and Repeater can have other child controls inside them. Example Data Grid can have combo box inside data grid. These child control do not raise there events by themselves, rather they pass the event to the container parent (which can be a data grid, data list, repeater), which passed to the page as “ItemCommand” event. As the child control send events to parent it is termed as event bubbling.

(B) How do we assign page specific attributes?

Page attributes are specified using the @Page directive.

(A) How do we ensure view state is not tampered?


Using the @Page directive and setting ‘EnableViewStateMac’ property to True.

(B) What is the use of @ Register directives?


@Register directive informs the compiler of any custom server control added to the page.

(B) What is the use of Smart Navigation property?


It’s a feature provided by ASP. NET to prevent flickering and redrawing when the page is posted back.

Note:- This is only supported for IE browser. Project is who have browser compatibility as requirements have to think some other ways of avoiding flickering.

(B) What is AppSetting Section in “Web.Config” file?


Web.config file defines configuration for a web project. Using “AppSetting” section, we can define user-defined values. Example below defined is “Connection String” section, which will be used through out the project for database connection.

<Configuration>
<appSettings>
<add key="ConnectionString" value="server=xyz;pwd=www;database=testing" />
</appSettings>

(B) Where is View State information stored?


In HTML Hidden Fields.

(I) what is the use of @ Output Cache directive in ASP.NET.


It is used for caching. See more for Caching chapter.

(B) How can we create custom controls in ASP.NET?


User controls are created using .ASCX in ASP.NET. After .ASCX file is created you need to two things in order that the ASCX can be used in project:.


• Register the ASCX control in page using the <percentage@ Register directive.Example


<%@ Register tag prefix="Accounting" Tag name="footer" Src="Footer.ascx" %>


• Now to use the above accounting footer in page you can use the below directive.


<Accounting: footer runat="server" />

(B) How many types of validation controls are provided by ASP.NET?


There are six main types of validation controls:-

RequiredFieldValidator

It checks whether the control have any value. It is used when you want the control should not be empty.

RangeValidator

It checks if the value in validated control is in that specific range. Example TxtCustomerCode should not be more than eight lengths.

CompareValidator

It checks that the value in controls should match some specific value. Example Textbox TxtPie should be equal to 3.14.

RegularExpressionValidator

When we want the control, value should match with a specific regular expression.

CustomValidator

It is used to define User Defined validation.
Validation Summary
It displays summary of all current validation errors on an ASP.NET page.

Note: - It is rare that some one will ask step by step all the validation controls. Rather they will ask for what type of validation which validator will be used. Example in one of the interviews i was asked how will you display summary of all errors in the validation control...just uttered one word Validation summary.

(B) Can you explain “AutoPostBack”?


If we want the control to automatically post back in case of any event, we will need to check this attribute as true. Example on a Combo Box change we need to send the event immediately to the server side then set the “AutoPostBack” attribute to true.

(B) How can you enable automatic paging in Data Grid?


Following are the points to be done in order to enable paging in Data grid:-
• Set the “Allow Paging” to true.
• In PageIndexChanged event set the current page index clicked.

Note: - The answers are very short, if you have implemented practically its just a revision. If you are fresher, just make sample code using Datagrid and try to implement this functionality.

(B) What is the use of “GLOBAL.ASAX” file?


It allows to execute ASP.NET application level events and setting application-level variables.

(B) What is the difference between “Web.config” and “Machine.Config”?


“Web.config” files apply settings to each web application, while “Machine.config” file apply settings to all ASP.NET applications.

(B) What is a SESSION and APPLICATION object?


Session object store information between HTTP requests for a particular user, while application object are global across users.

Other Interview question PDF's

.NET Interview Question PDF

Project Management interview questions

Download Networking Interview Questions

Download Software Testing Interview Questions

Download Sql Server Interview Questions

Download C# and ASP .Net Projects

Download Java Interview Questions

Download Software Architecture Interview Questions

Download Excel Question and Answers

Download HINDI Excel Question and Answers

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralThanks
Gnanadurai
4:14 3 Nov '08  
Hi
it is use for quick revision thanks.

C.Gnanadurai

GeneralRating
Tad McClellan
14:51 28 Aug '08  
So right now you have a 1.4 ish. You have a bunch of ones and what looks like a 5 and nothing in between. If I do the math, then that's 1 five, probably yours.

So my problem with this is on several levels not to mention that some of the answers aren't really correct. I give technical interviews all the time. Let me tell you, what gets my attention is not that the person I'm talking to gets the right answer (I expect that since they say they know asp.net on their resume) but it's how the answer is given. The difficulty with technology is not in the technology but in the communication of technical ideas. If a developer can't communicate more then just textbook answers and explain the why of things then I'm not interested.


GeneralRe: Rating
Shivprasad koirala
20:40 28 Aug '08  
First thing i have not voted myself...So does not matter if that rating is negative.. What you said is right textbook answer people will never complete project. The above questions are for quick revision. I mean many experenced people get lost with simple questions, its not that they do not know the answer its that they are in such busy schedule that its not possible for them to revise or probably some where they have lost their fundamentals.

We should always judge people with logic , but many IT companies still ask those bookish questions and not answering them does not clear even the first round.

Like what is SOA ..... I am sure many people who answer this will not be able to complete project practically and many who do not are excellent in delivery....

Why should we loose just because we do not know definition of something...

Just my two cents..... Wink

When i die i die programming

GeneralRe: Rating
Olivier Giulieri
1:29 29 Aug '08  
First, to help you guys find some common ground, I'd like to say that the interview process must be quite different in India and in America.

The funny thing is that during my first few years of development, I was able to answer text book questions. After over 15 years in the job, I forgot many things, and many things changed. Today I'm able to solve more complex problems and I now consider these kind of questions to be "googleable details" that I do not always know from memory.

Never the less, I think these questions can be useful for phone screening. When receiving many resumes, it is useful to have such a list of questions so that a manager (who doesn't have to be too technical) can simply eliminate candidates quickly before the real interview. That way we save time by only meeting with the few candidates who answer at least some of the questions correctly... and then go to the logic questions which really matter during the interview.
GeneralOnly got as far as the first answer...
Tom John
3:44 28 Aug '08  
"Page_init event only occurs when first time the page is started, but Page Load occurs in subsequent request of the page."

Both Init and Load occur on every page life cycle.

What about:

PreRender
Render
GeneralRe: Only got as far as the first answer...
edwin_vermeer
8:49 28 Aug '08  
And to be more complete"

Method - Active
-------------------------------------
Constructor - Always
Construct - Always
TestDeviceFilter - Always
AddParsedSubObject - Always
DeterminePostBackMode - Always
OnPreInit - Always
LoadPersonalizationData - Always
InitializeThemes - Always
OnInit - Always
ApplyControlSkin - Always
ApplyPersonalization - Always
OnInitComplete - Always
LoadPageStateFromPersistenceMedium - PostBack
LoadControlState - PostBack
LoadViewState - PostBack
ProcessPostData1 - PostBack
OnPreLoad - Always
OnLoad - Always
ProcessPostData2 - PostBack
RaiseChangedEvents - PostBack
RaisePostBackEvent - PostBack
OnLoadComplete - Always
OnPreRender - Always
OnPreRenderComplete - Always
SavePersonalizationData - Always
SaveControlState - Always
SaveViewState - Always
SavePageStateToPersistenceMedium - Always
Render - Always
OnUnload - Always
GeneralRe: Only got as far as the first answer...
Shivprasad koirala
20:46 28 Aug '08  
Noted

When i die i die programming

GeneralRe: Only got as far as the first answer...
Jon Holmes
6:51 14 Oct '08  
How about the use of MasterPages?

That adds more to the fire.

Master page controls Init event.
_Content controls Init event.
Master page Init event.
_Content page Init event.
_Content page Load event.
Master page Load event.
_Content controls Load event.
_Content page PreRender event.
Master page PreRender event.
Master page controls PreRender event.
_Content controls PreRender event.
GeneralNot correct question-answer pair about ViewState
mihasic
1:52 28 Aug '08  
>(B) Where is View State information stored?
>In HTML Hidden Fields.

this is correct when HiddenFieldPageStatePersister is used (default), but there canbe used any other PageStatePersister (for example SessionPageStatePersister)
GeneralRe: Not correct question-answer pair about ViewState
Shivprasad koirala
20:41 28 Aug '08  
Thanks i will incorporate it

When i die i die programming

GeneralIntresting Questions
sumit7034
23:19 27 Aug '08  
Worthy 4 interview


Last Updated 28 Aug 2008 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010