.Net, ASP.NET, C#, MVC 0 Comments

Make sure you include the correct unobtrusive ajax package; you want this:http://www.nuget.org/packages/Microsoft.jQuery.Unobtrusive.Ajax i.e., do this in the NuGet package manager console Install-Package Microsoft.jQuery.Unobtrusive.Ajax don’t use this older one: http://www.nuget.org/packages/jQuery.Ajax.Unobtrusive Also check you have unobtrusive ajax added into the project. 1. ./Views/Shared/_layouts.cshtml file should have the jqueryval bundle added to it, i.e., @Scripts.Render(“~/bundles/jquery”) @Scripts.Render(“~/bundles/bootstrap”) @Scripts.Render(“~/bundles/jqueryval”) @RenderSection(“scripts”, required:

Read More

.Net, ASP.NET, C#, MVC 0 Comments

HtmlHelper class includes two extension methods to generate a <select> element in a razor view: DropDownList() and DropDownListFor(). We will use the following Student model with DropDownList() and DropDownListFor() method. Example: Student Model public class Student { public int StudentId { get; set; } [Display(Name=”Name”)] public string StudentName { get; set; } public Gender StudentGender

Read More

.Net, ASP.NET, C#, MVC 0 Comments

ASP.NET Core MVC has built-in support for formatting response data, using fixed formats or in response to client specifications. Sections Format-Specific Action Results Content Negotiation Configuring Formatters Response Format URL Mappings View or download sample from GitHub. Format-Specific Action Results Some action result types are specific to a particular format, such as JsonResult and ContentResult.

Read More

.Net, ASP.NET, C#, MVC 0 Comments

Introduction to model binding Model binding in ASP.NET Core MVC maps data from HTTP requests to action method parameters. The parameters may be simple types such as strings, integers, or floats, or they may be complex types. This is a great feature of MVC because mapping incoming data to a counterpart is an often repeated

Read More

.Net, ASP.NET, C#, MVC 0 Comments

In a typical modern web application, the build process might: Bundle and minify JavaScript and CSS files. Run tools to call the bundling and minification tasks before each build. Compile LESS or SASS files to CSS. Compile CoffeeScript or TypeScript files to JavaScript. A task runner is a tool which automates these routine development tasks

Read More

.Net, ASP.NET, C#, MVC 0 Comments

Bundling and minification are two techniques you can use in ASP.NET to improve page load performance for your web application. Bundling combines multiple files into a single file. Minification performs a variety of different code optimizations to scripts and CSS, which results in smaller payloads. Used together, bundling and minification improves load time performance by

Read More

.Net, AngularJS, ASP.NET, C#, MVC 0 Comments

In this article, you will learn how to build a SPA-style ASP.NET application using AngularJS. Sections: What is AngularJS? Getting Started Key Components Angular 2.0 Summary Related Resources View or download sample code What is AngularJS? AngularJS is a modern JavaScript framework from Google commonly used to work with Single Page Applications (SPAs). AngularJS is

Read More