This article is about pitfalls which should be considered when you’re implementing an Ajax grid with jQuery and ASP.NET MVC. The sample in the article can be used as a
Tag: javascript
Passing AntiForgeryToken to every POST requestPassing AntiForgeryToken to every POST request
The best practice is that all POST request has AntiForgeryToken to prevent XSS attack. If you don’t know what it is, please, read materials in the bottom of the article.
Add or update URL query parameter in JavaScriptAdd or update URL query parameter in JavaScript
Add or update URL query parameter with respect to number of parameters and its position.
JavaScript string formatJavaScript string format
JavaScript has no built-in function to formatting strings, like C# string.Format(). This function solves the issue adding missing functionality.
Post JSON objects with nested classes to MVC actionPost JSON objects with nested classes to MVC action
Default view model binding of ASP.NET MVC has a disadvantage when using view models with nested classes and JSON objects. The binding is unable to recognize such nested classes and it initializes
Debugging JavaScript: object dumpDebugging JavaScript: object dump
From time to time you want a dump of an object during execution of JavaScript code. This function provides missing functional.