Few days back I was asked by my employer to prepare some interview questions on asp.net and sqlserver for the purpose of written test. I am providing few of the interview questions with answers for the same. Let me know your ideas on the topic.
What is the interface we need to implement in order to create a HTTP Handler- IMyHandler
- IHttpHandler
- IHttpHandlerFactory
- None of the above
- IMyHandler
What is the fastest way to retrieve data from the database- Use DataTable
- Use DataAdapter
- Use Dataset
- Use DataReader
- Use DataTable
What is the correct answer among the following regarding the ViewState- It is used to Create the visibility on the Web pages
- It is used to Maintain the State of the User as long as he surf the website
- It is used to maintain the state between the subsequent requests within a page
- It is used to increase the performance of the web application
- It is used to Create the visibility on the Web pages
When does the Session_Start event in the Global.asax fire,- When a new user starts using the application
- When the user logs into the server using the Login.aspx page
- When a user requests a secured page
- When first user sends a request
- When a new user starts using the application
There is a Master page called MyApplication.master and a content page called MyContentPage.aspx. When we run the application which of the following events will take place first- Page load event in the MyApplication.master
- Page load event in the MyContentPage.aspx
- PreInit event in the MyApplication.master
- PreInit event in the MyContentPage.aspx
- Page load event in the MyApplication.master
You need to execute code conditionally, depending on whether the page is generated in response to a server control event on the same page. How would you check this programmatically?
- Page.HasControls
- Page.IsCrossPagePostBack
- Page.IsPostBack
- Page.IsCallback
- Page.HasControls
In which folder you can place the SqlServer Express Edition- App_Data
- App_Code
- App_Themes
- App_LocalResources
- App_Data
App_Code folder is used to store the class files in asp.net (Introduced in 2.0).
App_Themes is used to store the skins, themes etc (Introduced in 2.0).
App_LocalResources is used to store the resource information in asp.net.
There is a class called as MyClass in C#. When initializing the class in Using block as,MyClass obj = new MyClass();using(obj){//Some Code to follow..}
- We cannot use "using" block for the Custom classes
- MyClass must implement IDisposable interface
- The obj must be declared in try, catch block
- using block cannot be used in ASP.NET, that is only related to C#
If one has two different web form controls in application and if one wanted to
know whether the values in the above two different web form control match what
control must be used.- DataGrid Control
- CompareValidator
- TextBox Validator
- ListView Control
- DataGrid Control
Which of the following denote ways to manage state in an ASP.Net Application?- Session Objects
- Application Objects
- View State
- All of the above
- Session Objects
In ASP.NET the < authorization > section contain which of the following
elements- <deny>
- <allow>
- Both A and B
- None of the above
- <deny>
What is the easiest way to handle all the exceptions in a web application- Use try.. catch block for all the methods
- Use Error handler at the page level in each page
- Use Application level Error handler at Global.asax
- Create a section in web.config file that can handle all the errors
- Use try.. catch block for all the methods
What is AJAX?- It is a technology that enables browsers to render information faster than normal way
- It is a technology which enables javascript to do high graphics on the web pages
- It is a latest version of the Web Services
- None of the above
- It is a technology that enables browsers to render information faster than normal way
What are the datasource controls available in ASP.NET- SqlDataSource
- ObjectDataSource
- XmlDataSource
All of the Above
- SqlDataSource
How do you Cache a DataTable- By using Cache object
- By saving the DataTable to xml file and keeping in memory
- Writing the Page Output Cache attribute on the page control
- Creating a user control for a DataTable
- By using Cache object
Trace and debug classes belong to which Namespace- System.Diagnostics
- System.Reflection
- System.Data
- None of the above
- System.Diagnostics
Column mappings belongs to which namespace- System.Data
- System.Data.Common
- System.Xml
- System.Data.Relations
- System.Data
I would never give these questions to a candidate. 'Which namespace are column mappings in?': Who cares? That's what Visual Studio and MSDN are for. These questions may be good at stopping someone at the door who has never done it, but that's about it.
ReplyDeleteI would focus on problem solving skills and general approaches to problems instead of a book test. Maybe give them a small project to complete and give them access to MSDN and VS. I realize you said your employer asked for written questions, so if you have to stick with that format I'd go with questions that demonstrate problem-solving and a real understanding of the workflow/technology, like the 'What is the viewstate used for' questions, but even that you could get a unqualified person who happened to open an asp.net book.
Just my 2 cents.
First of all thanks for the comment. As this interview will be for the candidates from fresher to experienced level I have to provide these questions. However, I will post more questions to the blog soon, so that will be helpfull for the persons who are in search of a job as well as who wants to improve their skills.
ReplyDeleteI will definitely used this to figure out if the candidate is real or fake. Thanks for posting.
ReplyDeleteIt's nice Queries but the thing is these all are basic one who is appearing freshers.most time.
ReplyDeleteNice job done man.
May be, better way is to categorize questionnaire based on ASP.NET concepts(like data access, UI, performance etc), skill level(basic, intermediate, expert) etc..Just my 2 cents!!!
ReplyDelete--Rajesh
Hi,The common way to present a navigational system on your website is through links to the different pages for Web Design Cochin that are placed on the header section.Thanks......
ReplyDelete