Showing posts with label Dot Net. Show all posts
Showing posts with label Dot Net. Show all posts

Thursday, 11 July 2013

AJAX

Q. What is Ajax?
Ans. Asyncronous Javascript and XML - Ajax is a combination of client side technologies that sets up asynchronous communication between the user interface and the web server so that partial page rendering occur instead of complete page postbacks.

Q. What is XmlHttpRequest in Ajax?
Ans. It is an object in Javascript that allows the browser to communicate to a web server asynchronously without making a postback.

Q. What are the different modes of storing an ASP.NET session?
Ans. InProc (the session state is stored in the memory space of the Aspnet_wp.exe process but the session information is lost when IIS reboots), StateServer (the Session state is serialized and stored in a separate process call Viewstate is an object in .NET that automatically persists control setting values across the multiple requests for the same page and it is internally maintained as a hidden field on the web page though its hashed for security reasons.

Q. What is a delegate in .NET?
Ans. A delegate in .NET is a class that can have a reference to a method, and this class has a signature that can refer only those methods that have a signature which complies with the class.

Q. Is a delegate a type-safe functions pointer?
Ans. Yes

Q. What is the return type of an event in .NET?
Ans. There is No return type of an event in .NET.

Q. Is it possible to specify an access specifier to an event in .NET?
Ans. Yes, though they are public by default.

Q. Is it possible to create a shared event in .NET?
Ans. Yes, but shared events may only be raised by shared methods.

Q. How to prevent overriding of a class in .NET?
Ans. Use the keyword NotOverridable in VB.NET and sealed in C#.

Q. How to prevent inheritance of a class in .NET?
Ans. Use the keyword NotInheritable in VB.NET and sealed in C#.

Q. What is the purpose of the MustInherit keyword in VB.NET?
Ans. MustInherit keyword in VB.NET is used to create an abstract class.

Q. What is the access modifier of a member function of in an Interface created in .NET?
Ans. It is always public, we cant use any other modifier other than the public modifier for the member functions of an Interface.

Q. What does the virtual keyword in C# mean?
Ans. The virtual keyword signifies that the method and property may be overridden.

Q. How many ways can we maintain the state of a page?
Ans. 1. Client Side - 

            Query string, hidden variables, viewstate, cookies
        2. Server side

            application , cache, context, session, database

Q. What is the use of a multicast delegate?
Ans. A multicast delegate may be used to call more than one method.

Q. What is the use of a private constructor?
Ans. A private constructor may be used to prevent the creation of an instance for a class.

Q. What is the use of Singleton pattern?
Ans. A Singleton pattern .is used to make sure that only one instance of a class exists.

What are difference between GET and POST Methods?

Ans:

GET Method (): 

1) Data is appended to the URL.
2) Data is not secret.
3) It is a single call system
4) Maximum data that can be sent is 256.
5) Data transmission is faster
6) this is the default method for many browsers

POST Method (): 


1) Data is not appended to the URL.
2) Data is Secret
3) it is a two call system.
4) There is no Limit on the amount of data. That is characters any amount of data can be sent.
5) Data transmission is comparatively slow.
6) No default and should be explicitly specified.