Showing posts with label dot net interview questions and answers. Show all posts
Showing posts with label dot net interview questions and answers. Show all posts

25 December, 2011

dot net interview questions and answers

1. What's the difference between Response.Write() and Response.Output.Write()?
-Both Response.Write() and Response.Output.Write() are used to display output on the Screen. But Using Reponse.Output.Write() you can display formattable output while Response.Write() can only display single character line.

2. Which control cannot be placed in MDI?
-The controls that do not have events.All the controls that cannot be placed on the MDI. Only certain controls can be pleced on the MDI they are Picture Box, Tool Strip, Status Bar, Timer, Progressvie Bar.

3. How many classes can a single .NET DLL contain?
-Many class store in single dll (unlimited)

4. Briefly explain what user controls are and what server controls are and the differences between the two.
-An ASP.NET control (sometimes called a server control) is a server-side component that is shipped with .NET Framework. A server control is a compiled DLL file and cannot be edited. server controls are asp.net controls it is not editable it is in compiled dll, user controls are collections of server controls which is use in application with saperate copy of controls

5. Does ViewState affect performance? What is the ideal size of a ViewState? How can you compress a viewstate?
-Viewstate stores the state of controls in HTML hidden fields. At times, this information can grow in size. This does affect the overall responsiveness of the page, thereby affecting performance.

6. What is CLR?
-CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that converts a MSIL code into the host machine language code, which is then executed appropriately. The CLR is the execution engine for .NET Framework applications.

7. What is the difference between VB6 and VB.Net?
-VB is a Object-based Language, does not supports threading, Not powerful Exception handling mechanism
-VB.net is a Object-oriented Language, supports threading, powerful in exception handling

8. How do you turn off cookies for one page in your site?
-It can be turned off by mentioning cookie state= false in web.config file

9. How can you detect if a viewstate has been tampered?
-By setting the EnableViewStateMac to true in the @Page directive.

10. Can you change a Master Page dynamically at runtime?
-Yes. To change a master page, set the MasterPageFile property to point to the .master page during the PreInit page event.

Reference:
http://www.questpond.com/

http://p2p.wrox.com/net-framework-2-0/31636-dot-net-interview-questions-answers.html

http://www.globalguideline.com/interview_questions/Questions.php?sc=Basic_Dot_Net_Programming_Interview_Questions_and_Answers

http://dotnetprojectninterviewquestions.blogspot.com/