nBots (nBots.blogspot.com), Providing you the latest Programming And Tech News.
Showing posts with label Odetocode. Show all posts
Showing posts with label Odetocode. Show all posts
Wednesday, 3 April 2013
Mapping an Angular Resource Service to a Web API
Previously I was calling an ASP.NET Web API controller from an AngularJS controller using the $http service. $http.get(serviceUrl).success(function (data) { $scope.videos = data; }); With a little bit of work I can use a higher level of abstraction in Angular - a custom service based on $resource.
Tuesday, 26 March 2013
ASP.NET WebAPI Tip #3: camelCasing JSON
var formatters = GlobalConfiguration.Configuration.Formatters; var jsonFormatter = formatters.JsonFormatter; var settings = jsonFormatter.SerializerSettings; settings.Formatting = Formatting.Indented; settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
Thursday, 21 March 2013
DropDownListFor with ASP.NET MVC
Building tags generates a few questions and is something I've written about before (see Dropdown Lists and ASP.NET MVC). Here's a quick example to examine the scenario from different perspectives with the DropDownListFor HTML helper. Let's say you have a class to represent different flavors of ice cream.
Subscribe to:
Posts (Atom)