No. 1 Fresher Jobs Website in India.
Are you employer? Register to Post Jobs Login
Search Jobs

ASP.NET Interview Questions 2010 by ASPNET

Details of ASP.NET Interview Questions 2010 by ASPNET conducted by ASPNET for job interview.
Share This Job With Others
ASP.NET questions
1. Explain the life cycle of an ASP .NET page.
2. Explain the .NET architecture.
3. What are object-oriented concepts?
4. How do you create multiple inheritance in c# and .NET?
5. When is web.config called?
6. How many weg.configs can an application have?
7. How do you set language in weg.config?
8. What does connection string consist of?
9. Where do you store connection string?
10. What is abstract class?
11. What is difference between interface inhertance and class inheritance?
12. What are the collection classes?
13. What are the types of threading models?
14. What inheritance does VB.NET support?
15. What is a runtime host?
16. Describe the techniques for optimizing your application?
17. Differences between application and session
18. What is web application virtual directory?
19. Differences between Active.exe and Dll
20. Connection pooling in MTS?
21. If cookies is disabled in client browser, will session tracking work?
22. How do you make your site SSL-enabled?
23. Will the following code execute successfully: response.write(,value of i=,+i);
24. What are the provides available with VB.NET?
25. What is a Process, Sesion and Cookie?
26. What are Abstract base classes?
27. What are the Difference between bstract base classes and Abstrat classes
28. What are interface in .NET?
29. How is Polymorphism supports in .NET?
30. What are the 2 types of polymorphism supports in .NET?
31. Types of compatibilities and explain them.
32. What is aggregative? How can it be implements in .NET?
33. Difference between COM components and .NET components?how to register it
34. Difference between early binding and late binding?
35. ASP.NET OBJECTS?
36. Asp.NET life cycle? When request mode
37. Explain ADO and its objects.
38. What is side by side execution?
39. Explain serialization?
40. Explain a class access specifiers and method acess specifiers.
41. What is the difference between overloading and overriding ? how can this be .NET
42. Explain virtual function and its usage.
43. How do you implement inhetance in .NET?
44. If I want to override a method 1 of class A and this class B then how do you declared
45. Explain friend and protected friend.
46. Explain multiple and multi_level inheritance in .NET?
47. Name all kind of access specifiers for a class and for methods?
48. On ODP.NET
49. What is non-derterministic finalization?
50. What is isPostback property?
51. What is dictionary base class?
52. How can a class be extended and how is this mechanism difff from that of implementation an interface?
53. What are indexes .NET?
54. How can indexes be implemented in .NET?


Active Server Pages interview questions
1. How do you create a recordset object in VBScript?
2. What is Querystring collection? - It allows you to extract data sent to the server using a GET request.
3. Explain the difference between POST and GET Method. - GET requests are string data that is visible to the end user via the URL and a limit of 2kb, POST requests have no limit on total data and the user can,t see the data in a query string.
4. Why do we use Option Explicit? - To avoid multiple variables of the same name.
5. How do you write an SQL insert statement? - insert into tablename (fieldA, fieldB, fieldC)Values(,dataA,, ,dataB,, ,dataC,);
6. How can you have different number of cells for each row of a table in HTML? - using colspan and rowspan
7. What is wrong with the following code:
8. What variable can you use to share info across the whole application for one user? - Use the sessions object
9. What is string concatenation function in VBScript? - the ampersand symbol and ampersand space underscore across multiple lines
10. How do you get the value of a combo box in Javascript? - document.forms[,formName,].elements[,comboName,].options[i].value
11. What is a class in CSS? - A class allows you to define different style characteristics to the same HTML element.
12. When inserting strings into a SQL table in ASP what is the risk and how can you prevent it?
13. Which is the default Data types in VBScript? - Variant.


.NET WebDev interview questions - Part 3
1. State True or False: If you set AutoGenerateColumns=True and still provide custom column definitions, the DataGrid will render both
o True
o False
2. The data from an XSL Transform with XmlReader can be returned in one of the following ways
o objReader = objXslT.Transform(objNav, nothing)
o objXslT.Transform(objNav, nothing)
o objReader = objXslT.Transform(objNav, nothing, objWriter)
o objXslT.Transform(objNav, nothing, objWriter)
3. Pick the command line that would result in the C# compiler generating an XML documentation file
o csc /doc:NewHome.xml NewHome.cs
o c /doc /docfile: NewHome.xml NewHome.cs
o csc /doc /out: NewHome.xml NewHome.cs
o csc /xml NewHome.cs
4. What is the comment syntax for C#,s XML-based documentation?
o /** and **/
o //#
o ///
o //*
5. When creating a C# Class Library project, what is the name of the supplementary file that Visual Studio.NET creates that contains General Information about the assembly?
o AssemblyInfo.xml
o AssemblyInfo.cs
o AssemblyInformation.cs
o AssemblyAttributes.cs
6. Which of the following is the C# escape character for Null?
o \n
o \0
o \f
o \v
7. What is the exception that is thrown when there is an attempt to dynamically access a method that does not exist?
o MissingMethodException
o TypeLoadException
o MethodLoadException
o MethodAccessException
8. What method(s) must be used with the Application object to ensure that only one process accesses a variable at a time?
o Synchronize()
o Lock() and UnLock()
o Lock()
o Asynchroize()
9. After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn,t execute. What could the problem be?
o The AutoEventWireup attribute is set to False
o The AutomaticPostBack attribute is set to False
o The codebehind module is not properly compiled
o The ListBox must be defined WithEvents
10. What method must be overridden in a custom control?
o The Paint() method
o The Control_Build() method
o The Render() method
o The default constructor
11. What is used to validate complex string patterns like an e-mail address?
o Extended expressions
o Regular expressions
o Irregular expressions
o Basic expressions
12. The following is a valid statement in ASP.NET
o True
o False
13. A valid comment block in ASP.NET is
o
o
o
o
14. The event handlers that can be included in the Global.asax file are
o Application Start and
Session Start event handlers only
o Application End and
Session End event handlers only
o Per-request and Non-deterministic event handlers only
o Application Start and End ,
Session Start and End, Per-request and Non-deterministic event handlers
15. A Few of the Namespaces that get imported by default in an ASPX file are
o System, System.Data, System.Drawing,
System.Globalization
o System,
System.IO, System.Management, System.Globalization
o System, System.Collections,
System.Text, System.Web
o System,
System.NET,
System.Reflection, System.Web
16. The Assemblies that can be referenced in an ASPX file without using @Assembly Directive is
o System.dll, System.Data.dll,
System.Web.dll, System.Xml.dll,
o System.dll,
System.Collections.dll, System.IO.dll
o System.dll, System.Reflection.dll,
System.Globalization.dll,
o System.Drawing.dll, System.Assembly.dll,
System.Text.dll
17. An .ASHX file contains the following
o Code-behind that are used in the code
o Server Controls that can be called from a code-behind file
o HTTP handlers-software modules that handle raw HTTP requests received by ASP.NET
o Contains normal ASP.NET code and can be used as an include file
18. What is the output for the following code snippet:
19. public class testClass
20. {
21. public static void Main(string[] args)
22. {
23. System.Console.WriteLine(args[1]);
24. }//end Main
}//end class testClass
o Compiler Error
o Runtime Error
o Hello C# world
o None of the above
25. One of the possible way of writing an ASP.NET handler that works like an ISAPI filter- that is, that sees requests and responses and modifies them also, is by,
o writing a module that extends FormsAuthenticatonModule and using it
o writing a component class that extends HttpModuleCollection and using it
o writing an HTTP module-a Class that implements IhttpModule and registering it in Web.Config
o All of the above
26. The ASP.NET directive that lets you cache different versions of a page based on varying input parameters, HTTP headers and browser type is
o @OutputCache
o @CacheOutput
o @PageCache
o @CacheAll
27. If we develop an application that must accommodate multiple security levels through secure login and ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
o
o
o
28. What is the output for the below mentioned compilation command>csc /addmodule:A.Exe B.Cs
o A.exe
o B.exe
o A.dll
o B.dll
29. How can be the web application get configured with the following authorization rules
o Anonymous users must not be allowed to access the application.
o All persons except David and John must be allowed to access the application.




30. What will be the output of the following code snippet?
31. using System;
32. class MainClass
33. {
34. static void Main( )
35. {
36. new MainClass().Display( 3.56 );
37. }
38.
39. private void Display( float anArg )
40. {
41. Console.Write( "{0} {1}", anArg.GetType(), anArg );
42. }
43.
44. double Display( double anArg )
45. {
46. Console.Write( "{0} {1}", anArg.GetType(), anArg );
47. return anArg;
48. }
49.
50. public decimal Display( decimal anArg )
51. {
52. Console.Write( "{0} {1}", anArg.GetType(), anArg ); return anArg;
53. }
54. }
o System.Single 3.56
o System.Float 3.56
o System.Double 3.56
o System.Decimal 3.56
55. What will be output for the given code?
56. Dim I as integer = 5
57. Do
58. I = I + 2
59. Response.Write (I & " ")
60. Loop Until I > 10
o 5 8
o 5 7 9
o 7 9 11
o Errors out



.NET database dev questions
1. To test a Web Service you must create a windows application or web application to consume this service? It is True/False?
2. How many classes can a single.NET DLL contain?
3. What are good ADO.NET object(s) to replace the ADO Recordset object?
4. On order to get assembly info which namespace we should import?
5. How do you declare a static variable and what is its lifetime? Give an example.
6. How do you get records number from 5 to 15 in a dataset of 100 records? Write code.
7. How do you call and execute a Stored Procedure in.NET? Give an example.
8. What is the maximum length of a varchar in SQL Server?
9. How do you define an integer in SQL Server?
10. How do you separate business logic while creating an ASP.NET application?
11. If there is a calendar control to be included in each page of your application, and and we do not intend to use the Microsoft-provided calendar control, how do you develop it? Do you copy and paste the code into each and every page of your application?
12. How do you debug an ASP.NET application?
13. How do you deploy an ASP.NET application?
14. Explain similarities and differences between Java and.NET?
15. Specify the best ways to store variables so that we can access them in various pages of ASP.NET application?
16. What are theXML files that are important in developing an ASP.NET application?
17. What are theXML files that are important in developing an ASP.NET application?
18. What is XSLT and what is its use?
19. How many objects are there in ASP?
20. Which DLL file is needed to be registered for ASP?
21. Is there any inbuilt paging (for example shoping cart, which will show next 10 records without refreshing) in ASP? How will you do pating?
22. What does Server.MapPath do?
23. Name atleast three methods of response object other than Redirect.
24. Name atleast two methods of response object other than Transfer.
25. What is State?
26. Explain differences between ADO and DAO.
27. How many types of cookies are there?
28. Tell few steps for optimizing (for speed and resource) ASP page/application.
29. Which command using Query Analyzer will give you the version of SQL Server and Operating System?
30. Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table.
31. What is the purpose of using COLLATE in a query?
32. What is one of the first things you would do to increase performance of a query? For example, a boss tells you that "a query that ran yesterday took 30 seconds, but today it takes 6 minutes"?
33. What is an execution plan? When would you use it? How would you view the execution plan?
34. What is the STUFF function and how does it differ from the REPLACE function?
35. What does it mean to have quoted_identifier on? What are the implications of having it off?
36. What are the different type of replication? How are they used?
37. What is the difference between a Local temporary table and a Global temporary table? How is each one used?
38. What are cursors? Name four type of cursors and when each one would be applied?
39. What is the purpose of UPDATE STATISTICS?
40. How do you use DBCC statements to monitor various ASPects of a SQL Server installation?
41. How do SQL Server 2000 andXML linked? What is SQL Server agent?
42. What is referential integrity and how can we achieve it?
43. What is indexing?
44. Explain differences between server.transfer and server.execute method?
45. What is de-normalization? When do you do it and how?
46. Explain features of SQL Server like Scalibility, Availability, Integration with Internet.
47. What is DataWarehousing?
48. What is OLAP?
49. How do we upgrade SQL Server 7.0 to 2000?
50. What is job?
51. What is Task?
52. How would you update the rows which are divisible by 10, given a set of numbers in column?
53. How do you find the error, how can you know the number of rows affected by last SQL Statement?
54. What are the advantages/disadvantages of viewstate?
55. Describe session handling in webform. How does it work and what are the limits?
56. Explain differences between framework 1.0 and framework 1.1
57. If we write any code for dataGrid methods, what is the access specifier used for that methods in the code behind file and why and how? Give an example.
58. What is the use of trace utility?
59. What are the differences between User control and Web control and Custom control?
60. If I have more than one version of one assemblies, then how will I use old version in my application? Give an example.
61. How do you create threadinf in.NET?
62. Describe the Managed Execution Process.
63. What is Active Directory? What is the namespace used to access the Microsoft Active Directories?
64. What are Interop Services?
65. How does you handle this COM components developed in other programming languages in.NET?
66. How will you register COM+ services?


Interview questions for .NET
1. What is a static class?
2. What is static member?
3. What is static function?
4. What is static constructor?
5. How can we inherit a static variable?
6. How can we inherit a static member?
7. Can we use a static function with a non-static variable?
8. How can we access static variable?
9. Why main function is static?
10. How will you load dynamic assembly? How will create assesblies at run time?
11. What is Reflection?
12. If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) in my application?
13. How do you create threading in.NET? What is the namespace for that?
14. What do you mean by Serialize and MarshalByRef?
15. What is the difference between Array and LinkedList?
16. What is Asynchronous call and how it can be implemented using delegates?
17. How to create events for a control? What is custom events? How to create it?
18. If you want to write your own dot net language, what steps you will you take care?
19. Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?
20. How dot net compiled code will become platform independent?
21. Without modifying source code if we compile again, will it be generated MSIL again?
22. How does you handle this COM components developed in other programming languages in.NET?
23. How CCW (Com Callable Wrapper) and RCW (Runtime Callable Wrappers) works?
24. What are the new thee features of COM+ services, which are not there in COM (MTS)?
25. What are the differences between COM architecture and.NET architecture?
26. Can we copy a COM dll to GAC folder?
27. What is Shared and Repeatable Inheritance?
28. Can you explain what inheritance is and an example of when you might use it?
29. How can you write a class to restrict that only one object of this class can be created (Singleton class)?
30. What are virtual destructures?
31. What is close method? How its different from Finalize and Dispose?
32. What is Boxing and UnBoxing?
33. What is check/uncheck?
34. What is the use of base keyword? Tell me a practical example for base keyword,s usage?
35. What are the different.NET tools which you used in projects?
36. What will do to avoid prior case?
37. What happens when you try to update data in a dataset in.NET while the record is already deleted in SQL Server as backend?
38. What is concurrency? How will you avoid concurrency when dealing with dataset?
39. One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?
40. How do you merge two datasets into the third dataset in a simple manner?
41. If you are executing these statements in commandObject. "Select * from Table1; Select * from Table2″ How you will deal result set?
42. How do you sort a dataset.
43. If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
44. What is the use of Parameter object?
45. How to generateXML from a dataset and vice versa?
46. How do you implement locking concept for dataset?
47. How will you do Redo and Undo in TextBox control?
48. How to implement DataGrid in.NET? How would you make a combo-box appear in one column of a DataGrid? What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for DataGrid methods. what is the access specifier used for that methods in the code behind file and why?
49. How can we create Tree control in asp.NET?
50. Write a program in C# to find the angle between the hours and minutes in a clock?
51. Write a program to create a user control with name and surname as data members and login as method and also the code to call it.
52. How can you read 3rd line from a text file?
53. Explain the code behind wors and contrast that using the inline style.
54. Explain different types of HTML, Web and server controls.
55. What are the differences between user control and server control?
56. How server form post-back works?
57. Can the action attribute of a server-side
tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page?
58. How would ASP and ASP.NET apps run at the same time on the same server?
59. What are good ADO.NET object to replace to ADO Recordset object.
60. Explain the differences between Server-side code and Client-side code.
61. What type of code(server or client) is found in a Code-Behind class?
62. Should validation (did the user enter a real date) occur server-side or client-side? Why?
63. What does the "EnableViewState" property do? Why would I want it on or off?
64. What is the difference between Server.Transfer and response.Redirect? Why?
65. Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced.NET component?
66. Let,s say I have an existing application written using VB6 and this application utilizes Windows 2000 COM+ transaction services. How would you approach migrating this application to.NET?
67. If I am developing an application that must accomodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?
68. What are ASP.NET web forms? How is this technology different than what is available though ASP(1.0-3.0)?
69. How does VB.NET achieve polymorphism?
70. How does C# achieve polymorphism?
71. Can you explain what is Inheritance and an example in VB.NET and C# of when you might use it?
72. Describe difference between inline and code-behind?
73. What is loosely coupled solution in.NET?
74. What is diffgram?
75. Where would you use an iHTTPModule and what are the limitations of any approach you might take in implementing one?
76. What are the Advantages and DisAdvantages of viewstate?
77. Describe session handling in a webform, how does it work and what are the limitations?
78. How would you get ASP.NET running in Apache web servers? Explain it,s limitations.
79. What is MSIL and why should my developers need an appreciation of it if at all?
80. Which methos do you invoke on the DataAdapter control to load your generated dataset with data?
81. Can you edit data in Repeater control? How?
82. Which template must you provide, in order to display data in a Repeater control?
83. How can you provide an alternating color scheme in a Repeater control?
84. What property must you set, and what method must you call in your code, in order to bind the data from some data source to the repeater control?
85. What base class do all web forms inherit from?
86. What method do you use to explicitly kill a user,s session? How?
87. How do you turn off cookies for one page in your site? Give an example.
88. Which two properties are on every validation control?
89. What tags do you need to add within the asp:datagrid tags to bind columns manually? Give an example.
90. How do you create a permanent cookie?
91. What tag do you use to add a hyperlink column to the dataGrid?
92. What is the standard you use to wrap up a call to a Web Service?
93. Which method do you use to redirect the user to another page without performing a round trip to the client? How?
94. What is the transport protocol you use to call a Seb Service SOAP?
95. What does WSDL stand for?
96. What property do you have to set to tell the grid which page to go to when using the Pager object?
97. Where on the Internet would you look for Web Services?
98. What tags do you need to add within the asp:datagrid tags to bind columns manually? How?
99. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
100. How is a property designated as read-only?
101. Which control would you use if you needed to make sure the values in two different controls matched?



Simple interview questions on Microsoft .NET
1. What is the base class of .NET?
2. Explain assemblies.
3. Name some of the languages .NET support?
4. ADO.NET features? Benefits? Drawbacks?
5. How many types of exception handlers are there in .NET?
6. Difference between Panel and GroupBox classes?
7. What is the base class of Button control?
8. What is Response object? How is it related to ASP,s Response object?
9. What is IIS? Have you used it?
10. Main differences between ASP and ASP.NET.