Learn C#, MVC, jQuery,AngularJS

Learn C#,MVC,jQuery,AngularJS

IHttpActionResult in WebAPI

IHttpActionResult  is an interface which was introduced in WebAPI 2.It is used to create HttpResponseMessage which is one of the return types in WebAPI. Use of IHttpActionResult Using IHttpActionResult  to return HttpResponseMessage object instead of directly returning the HttpResponseMessage object has the following advantages:...

Media Formatters in ASP.NET Web API

Media Type or MIME type specifies the data being transfered between the client and server in HTTP request or response. The MIME type for image is image/png.So if the MIME type is specified as image/png for Content-Type of the response...

Routing in WebAPI

Routing in WebAPI is very similar to routing in MVC. In MVC application routing maps a URL to action methods in Controller.Similarly in WebAPI routing is used to map a URL to action method in Controller. In a WebAPI project routing is...

Shortcut Keys in Visual Studio

Build Related Ctrl+Shift+B     Build Solution Ctrl+F7    Compile Ctrl+Break  Cancel build Comments Ctrl+K ,Ctrl+C   Comment selection Ctrl+K,Ctrl+U   Uncomment selection Bookmark Ctrl+K ,Ctrl+C   Create/Remove bookmark Collapse – Expand elements Ctrl+M ,Ctrl+O   Collapse to definitions.If we use these...

HTTPResponseMessage in WebAPI

In a client server communication client sends a request to a server and server responds with some response message.In this communication the request and response have a specific format.Response returned by the server has the following format Status denotes the success...

Grid Control in WebAPI

You can display and edit the data returned from a web api service using the web api grid. Required references To use the grid include the following js and css in the web page <script src=”../Scripts/WebGrid.js” type=”text/javascript”></script> <link href=”../Content/GridStyle.css” rel=”stylesheet”...

OAuth protocol

OAuth is a authorization protocol. OAuth allows the resources of users stored on a website such as a facebook to be accessed by third party website.So if you have some contacts added in facebook you can authorize a website which allows you...

How action method is selected in WebAPI

WebAPI is a framework used for developing HTTP services. Like MVC application WebAPI also uses controller and action methods to handle the requests.Similar to MVC WebAPI also supports concepts such as: Controllers and action methods Routing Filters Model Binding But...

Action,Func and Predicate in .NET

Delegate in .NET is a type which can refer to a method.So if we have a delegate type declared as

then the above delegate can point to a method which accepts two integer arguments and returns an integer type

...

HttpHandler and HttpModule in ASP.NET

When a request is received by the web server or IIS , the request is sent to the worker process.Worker process initializes ASP.NET runtime which handles the request.Request flows through a well defined pipeline to generate the response. Following are...