Technical interview questions and answers play a major role in Dot Net Interviews because companies want candidates who understand the .NET Framework, CLR, C#, ASP.NET, ADO.NET, and application lifecycle management. Dot Net skills are widely used in enterprise application development, making this topic important in interviews for both freshers and experienced candidates. Companies like TCS, Infosys, Wipro, Cognizant, and Capgemini frequently ask questions on .NET fundamentals, coding techniques, and real-time scenarios to assess your problem-solving and programming capabilities. This guide provides the most important Dot Net interview questions with answers to help you prepare effectively. With clear explanations and examples, these questions will help you build confidence and perform well in technical rounds and project-based discussions during placement interviews.
1. whats the difference between Response.Write() andResponse.Output.Write()?
Answer: 1. The latter one allows you to write formattedoutput.
Show Answer
Hide Answer
2. What methods are fired during the page load?
Answer: Init() - when the pageis instantiated, Load() - when the page is loaded into server memory,PreRender() - the brief moment before the page is displayed to the user asHTML, Unload() - when page finishes loading.
Show Answer
Hide Answer
3. Where does the Web page belong in the .NET Framework class hierarchy?
Answer: System.Web.UI.Page
Show Answer
Hide Answer
4. Where do you store the information about the users locale?
Answer: System.Web.UI.Page.Culture
Show Answer
Hide Answer
5. whats a bubbled event?
Answer: 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.
Show Answer
Hide Answer
6. What data type does the RangeValidator control support?
Answer: Integer,String and Date.
Show Answer
Hide Answer
7. Explain the differences between Server-side and Client-side code?
Answer: Server-side code runs on the server. Client-side code runs in the clients browser.
Show Answer
Hide Answer
8. What type of code (server or client) is found in a Code-Behind class?
Answer: Server-side code.
Show Answer
Hide Answer
9. What does the "EnableViewState" property do? Why would I want it on or off?
Answer: It enables the viewstate on the page. It allows the page to save the users input on a form.
Show Answer
Hide Answer
10. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Answer: Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.
Show Answer
Hide Answer
11. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
Answer: This is where you can set the specific variables for the Application and Session objects.
Show Answer
Hide Answer
12. Can you explain what inheritance is and an example of when you might use it?
Answer: When you want to inherit (use the functionality of) another class. Base Class Employee. A Manager class could be derived from the Employee base class.
Show Answer
Hide Answer
13. What is an assembly?
Answer: Assemblies are the building blocks of the .NET framework.
Show Answer
Hide Answer
14. What is the difference between inline and code behind.
Answer: 1. Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.
Show Answer
Hide Answer
15. Whats MSIL, and why should my developers need an appreciation of it if at all?
Answer: MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.
Show Answer
Hide Answer
16. Can you edit data in the Repeater control?
Answer: No, it just reads the information from its data source
Show Answer
Hide Answer
17. Which template must you provide, in order to display data in a Repeater control?
Answer: ItemTemplate
Show Answer
Hide Answer
18. How can you provide an alternating color scheme in a Repeater control?
Answer: Use the AlternatingItemTemplate
Show Answer
Hide Answer
19. 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?
Answer: You must set the DataSource property and call the DataBind method.
Show Answer
Hide Answer
21. Name two properties common in every validation control?
Answer: ControlToValidate property and Text property.
Show Answer
Hide Answer
22. What tags do you need to add within the asp:datagrid tags to bind columns manually?
Answer: Set AutoGenerateColumns Property to false on the datagrid tag
Show Answer
Hide Answer
24. What is the transport protocol you use to call a Web service?
Answer: SOAP is the preferred protocol.
Show Answer
Hide Answer
27. 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?
Answer: DataTextField property
Show Answer
Hide Answer
28. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
Answer: The .Fill() method
Show Answer
Hide Answer
29. Which control would you use if you needed to make sure the values in two different controls matched?
Answer: CompareValidator Control
Show Answer
Hide Answer
30. True or False: To test a Web service you must create a windows application or Web application to consume this service?
Answer: False, the webservice comes with a test page and it provides HTTP-GET method to test.
Show Answer
Hide Answer
31. How many classes can a single .NET DLL contain?
Answer: It can contain many classes.
Show Answer
Hide Answer
32. what is a diffgram, and a good use for one?
Answer: The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a Web Service.
Show Answer
Hide Answer
33. Should validation (did the user enter a real date) occur server-side or client-side? Why?
Answer: Client-side. This reduces an additional request to the server to validate the users input.
Show Answer
Hide Answer