Pradhanmantri – All Episodes – A Weekly show on ABP News hosted Shekhar Kapur and directed by Puneet Sharma

Pradhanmantri was an Indian television political documentary series, hosted by actor-director Shekhar Kapur on Hindi news channel ABP News, which premiered on July 13, 2013. It aims to bring to the audience the never seen before facts of Indian history.[2][3] The weekly programme chronicles the history of India from 1947 to the present day. The […]

Ng Table with ASP.NET MVC WEB API and Angular js

Before reading this post, I recommend you to visit the ng-table official documentation and site and get the basic ng-table working. Below is my api which accepts some grid params like PageNumber PageSize SortColumn SortOrder SearchTerm for simplicity I have not involved database in this example. This api method return a CustomerGridResult object, which has […]

Cancel / Undo in AngularJs – How to revert data ?

Consider the following buttons Edit Save Cancel When user clicks edit and changes data and then uses the cancel button to get the old data, here is how you could implement this. HTML <div> <button data-ng-click=”edit()” data-ng-show=”!editing”>Edit</button> <button data-ng-click=”save()” data-ng-show=”editing”>Save</button> <button data-ng-click=”cancel()” data-ng-show=”editing”>Cancel</button> </div> AngularJs $scope.edit = function () { $scope.editing = true; $scope.copy = […]

How to use angular ng attributes with TextBoxFor, EditorFor in Razor and ASP.NET MVC

New to angular.js today I tried to add ng-model data attribute to my textbox on my login form. The login form uses Html.TextboxFor helper. I tried the following but visual studio showed me an error @Html.TextBoxFor(m => m.UserName, new { ng-model=”” }) in C# – is not valid. So here’s a workaround for the same. […]

HTTP Error 500.50 – URL Rewrite Module Error. The server variable is not allowed to be set.

I recently got this error when updating my rewrite rules in my system.webServer node of my web.config. The error message stated “HTTP Error 500.50 – URL Rewrite Module Error. The server variable “SERVER_PORT” is not allowed to be set. Add the server variable name to the allowed server variable list.” Here is how you add […]

Reading from a file hosted on a server using C#

This post describes how to read a file which is hosted on server i.e on some url. Let’s say I have a .txt file hosted here – I want my code to read from this hosted file. Below is how you do it using WebClient class. var urlToReadFrom = “” using(var client = new […]

Convert a List of items to an XElement in C#

I have always used XElement.Parse() and StringBuilder to create an XElement of a required type. Today I came across this post on some blog and then this thread on stackoverflow which show how to do the same in a more efficient manner. Sharing it here hope this helps. Requirement 1: <students> <student>1</student> <student>2</student> <student>3</student> <student>4</student> […]

Serialize a List of Object to JSON in C#

This can be easily be done using Json.NET. Json.NET is a popular high-performance JSON framework for .NET. First of all, you will need to download the latest binary from here and include it your project. using Newtonsoft.Json; Rest of the code is pretty self explanatory… public class Employee { public string FirstName { get; set; […]

Using Facebook Login with ASP.NET MVC 4

Login with Facebook is a very common feature that you will come across on the registration/login page on almost all good websites. ASP.NET MVC 4 includes support for OAuth and OpenID providers. Using these providers, you can let users log into your site using their existing credentials from Facebook, Twitter, Microsoft, and Google. MVC 4 […]

A Beginners Guide to IIS Logging

IIS Internet Information Server is one of the most powerful web servers provided by Microsoft that is able to host and run your web applications. IIS supports the following protocols: FTP, FTPS, SMTP, NNTP, HTTP/HTTPS. We can host our web sites on IIS, we can use it as an FTP site also. For more information, […]

How to Focus element using pure HTML ? How to set CSS for on Focus?

To set focus on page load using pure html you can use the autofocus keyword. Here is an example on JsFiddle. And to set the css for on focus use the :focus selector in your css. Below is the sample code I have used. <form> <input type=”text” id=”FirstName” placeholder=”First Name” autofocus> <input type=”text” id=”LastName” placeholder=”Last […]

Achieving versioning with Web API in ASP.NET MVC

There are two ways to achieve versioning with Web API Method 1 : The simple method /api/accountv1/ /api/accountv2/ The simplest way I found in versioning your API is to create an identical controller of “AccountV1Controller” and name it “AccountV2Controller“, notice the suffix V1 and V2 in controller name, we’ll depend on this part to select […]

Resumes, Interview Questions and Answers, Placement Papers, Online Test and everything you need to get your Dream Job.

Visit Site
Check out Cool Resumes Templates & Interview Questions with Answers only at
Hello. Add your message here.