Thứ Ba, 30 tháng 12, 2008

Dot Net Interview Questions - Part 2



1.What are server controls?

Ans : ASP.NET server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes.

2.What are Sealed Classes in C#?

Ans : The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the base class of another class. (A sealed class cannot also be an abstract class) .

3.What is the difference between Array and Arraylist?

Ans : As elements are added to an ArrayList, the capacity is automatically increased as required through reallocation. The capacity can be decreased by calling TrimToSize or by setting the Capacity property explicitly.

4.What is Jagged Arrays?

Ans : A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an “array-of-arrays.”

5.Which method is used to redirect the user to another page without performing a round trip to the client?

Ans : Server.Transfer method.

6.Is it possible to debug java-script in .NET IDE? If yes, how?

Ans : Yes, simply write “debugger” statement at the point where the breakpoint needs to be set within the javascript code and also enable javascript debugging in the browser property settings.

7.How many ways can we maintain the state of a page?

Ans : Client Side - Query string, hidden variables, viewstate, cookies

Server side - application , cache, context, session, database.

8.Will the finally block be executed if an exception has not occurred?

Ans : Yes it will execute.

9.What is the base class of all web forms?

Ans : System.Web.UI.Page .

10.Can we force the garbage collector to run?

Ans : Yes, using the System.GC.Collect(), the garbage collector is forced to run in case required to do so.

11.What does the virtual keyword in C# mean?

Ans : The virtual keyword signifies that the method and property may be overridden.

12.Whats the difference between web.config and app.config?

Ans : Web.config is used for web based asp.net applications whereas app.config is used for windows based applications.

13.What is the difference between a session object and an application object?

Ans : A session object can persist information between HTTP requests for a particular user, whereas an application object can be used globally for all the users.

14.Is it possible to perform forms authentication with cookies disabled on a browser?

Ans : No, it is not possible.

15.Which control has a faster performance, Repeater or Datalist?

Ans : Repeater.

16.What technique is used to figure out that the page request is a postback?

Ans : The IsPostBack property of the page object may be used to check whether the page request is a postback or not. IsPostBack property is of the type Boolean.

17.How can we force a thread to sleep for an infinite period?

Ans : Call the Thread.Interupt() method.

18.What’s the difference between Response.Write() andResponse.Output.Write()?

Ans : Response.Output.Write() allows you to write formatted output.




19.Describe the difference between inline and code behind.

Ans : 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.

20.What is the lifespan for items stored in ViewState?

Ans : Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).

21.What is PostBack & Callback?

Ans : One technique that current ASP.NET 1.0/1.1 developers use to overcome this postback problem is to use the Microsoft XMLHTTP ActiveX object to send requests to server-side methods from client-side JavaScript. In ASP.NET 2.0, this process has been simplified and encapsulated within the function known as the Callback Manager. The ASP.NET 2.0 Callback Manager uses XMLHTTP behind the scenes to encapsulate the complexities in sending data to and from the servers and clients. And so, in order for the Callback Manager to work, you need a web browser that supports XMLHTTP. Microsoft Internet Explorer is, obviously, one of them.

22.What is singlecall and singleton ?

Ans : Differneces between Single Call & Singleton. Single Call objects service one and only one request coming in. SingleCall objects are useful in scenarios where the objects are required to do afinite amount of work. Single Call objects areusually not required to store state information, and they cannot hold state information between method calls. However, SingleCall objects can be configured in aload-balanced fashion.

Singleton objects are those objects that service multiple clients and hence share data by storing state information between client invocations. They are useful in cases in which data needs tobe shared explicitly between clients and also in which the overhead of creating and maintaining objects is substantial.

23.What is Machine.config File ?

Ans : As web.config file is used to configure one asp .net web application, same way Machine.config file is usedto configure application according to a particular machine. That is, configuration done in machine.configfile is affected on any application that runs on a particular machine. Usually, this file is not alteredand only web.config is used which configuring applications.

24.What debugging tools come with the .NET SDK?

Ans : 1. CorDBG – command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch.

2. DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR.

25.What does assert() method do?

Ans : In debug compilation, assert takes in a Boolean condition as a parameter, and shows the errordialog if the condition is false. The program proceeds without any interruption if the conditionis true.

14 nhận xét:

  1. *"' I am very thankful to this topic because it really gives up to date information ,,.

    Trả lờiXóa
  2. I have read some just right stuff here. Certainly price bookmarking for revisiting. I wonder how so much attempt you place to make this kind of wonderful informative site.

    Trả lờiXóa
  3. ... [Trackback]...

    [...] There you will find 96697 more Infos: i-php.net/2008/12/dot-net-interview-questions-part-2/ [...]...

    Trả lờiXóa
  4. recreational drugs such as amyl nitrate or nitrite ("poppers"). Taking Viagra with a nitrate medicine cancheap cialis

    Trả lờiXóa
  5. drug viagra heart disease or heart rhythm problems;

    Trả lờiXóa
  6. If you need to uncover good info on some good health products that happen to be designed to help make your skin look better then take a look at in your own home microderm today! My site offers some great user reviews around the item and enables you to pick which microdermabrasion system is for you. Check out quays clinic for hypnotherapy sessions.

    Trả lờiXóa
  7. there are two other patents covering the methods for manufacturing Viagra, and Pfizer has maintained free samples of viagra invalidated in 2000 because of obviousness; this decision was upheld on appeal in 2002.4]5] But viagra safe Severe hepatic impairment (decreased liver function) viagra samples dyspepsia, nasal congestion and impaired vision, including photophobia and blurred vision.1] Some
    wiki

    Trả lờiXóa
  8. Secrets, lies, hidden truths, misconceptions and that is just the tip of the iceberg. Some things should remain hidden while others, in my opinion, should most certainly be shared. I discovered some cash creators which might be completely hidden and the entire market is worth billions. There is no way that it can be over saturated and you getting in on it will do me no harm... so here is the link to get you started. http://tinyurl.com/827pf9k

    Trả lờiXóa
  9. decided to market it for erectile dysfunction, rather than for angina. The drug was patented in 1996, approved cialis prescription not occur if they are taken at least four hours apart.2] brand name only cialis used to. But only to themselves, it seems very difficult to share this, even with some of your closest friends, FDA pregnancy category B: This medication is not expected to be harmful to an unborn baby. Do not use Viagra

    Trả lờiXóa
  10. When taking nitric oxide donors, organic nitrites and nitrates, such as glyceryl trinitrate (nitroglycerin), does generic viagra work the drug had little effect on angina, but that it could induce marked penile erections.]3] Pfizer therefore cheap female viagra body in any way. blurriness and loss of peripheral vision. In July 2005, the U.S. Food and Drug Administration found that
    wiki

    Trả lờiXóa