Contents tagged with jQuery

  • Select All and Delete using ASP.NET MVC and AngularJS

    In my previous article I illustrated how jQuery can be used to select and delete records in an ASP.NET MVC application. A few readers asked how the same can be accomplished using AngularJS instead of jQuery. This article shows just that. Recollect how our Index view looks like and how it allows you to select all rows through the header checkbox or individual rows through the respective checkboxes.

  • Utilize HTML5 DataList and jQuery Ajax to Create Autocomplete in ASP.NET MVC

    In data entry forms involving textboxes with predictable values one can use autocomplete to assist user pick an existing value. HTML5 introduces datalist element that can come handy while implementing autocomplete. The datalist element holds a list of options and can be attached with a textbox using list attribute. By adding a bit of jQuery Ajax you can dynamically populate the options in a datalist. This article shows you how to do just that.

  • Load ASP.NET MVC Partial Views Dynamically Using jQuery

    Most of the times ASP.NET MVC views are rendered as a result of user navigating to some action. For example, when a user navigates to /home/index in the browser (either through address bar or through a hyperlink), ASP.NET MVC executes the action method and usually returns a view to the browser. This means each view is rendered as a result of a full GET or POST request. At times, however, you may want to load views dynamically through Ajax. This way you can render contents of a view without full page refresh.

  • Learn ASP.NET MVC, jQuery, AngularJS & HTML5 in Thane. Registration started for November 2014 batches!

    We will be conducting a 5 day intensive training programs on ASP.NET MVC, jQuery, AngularJS and HTML5 in the month of November 2014. Small batches, personal attention and real world examples. Registration has already started. In case you or your friends are interested to join please get in touch with us as soon as possible. The courses are conducted in Thane. You may read more details here.

  • One Time Event Handlers using jQuery and ASP.NET

    Most of the times the JavaScript event handlers attached with an element fire every time the event under consideration is raised. For example, if you wire a click event handler to the click event of a button then clicking that button will invoke the event handler function every time. At times, however, this behavior is undesirable. You can unsubscribe the click event handler when it gets executed the first time. That means you need to create event handlers that fire only one time. Luckily, jQuery provides an inbuilt way to accomplish this task - one() method.

  • Implementing Ajax Login in ASP.NET MVC

    Implementing Ajax based login involves many of the same steps as the normal forms authentication. However, the login page doesn't send user ID and password to the server through a standard form submission. Instead, user credentials are sent to the server via an Ajax request. The credentials are then validated on the server and the result of the verification process is conveyed to the client. If the login attempt was successful, the user is taken to the secured area of the website.

  • Creating a Slide Show Using the History API and jQuery

    During Ajax communication, page content is often modified in some way or another. Since Ajax requests are sent through a client side script, the browser address bar remains unchanged even if the page content is being changed. Although this behavior doesn't create any problem for an application's functionality, it has pitfalls of its own. That's where History API comes to your rescue. History API allows you to programmatically change the URL being shown in the browser's address bar. This article demonstrates how History API can be used with an example of a slide show.

  • Posting GridView Data to MVC Controller

    Visual Studio 2013 provides a unified development environment for ASP.NET Web Forms and ASP.NET MVC applications. This unified environment is called as One ASP.NET. What it means for developers is that a single project can use Web Forms, MVC controllers and Web API. Under One ASP.NET at times the existing Web Forms may want to send and receive data to and from the MVC controllers. This article illustrates how this task can be accomplished.

  • My latest book - Beginning jQuery 2 for ASP.NET Developers

    Beginning jQuery 2 for ASP.NET Developers - Written specifically for ASP.NET Developers, this book covers all the essential information about using jQuery with ASP.NET Web Forms and ASP.NET MVC applications. Covers Selectors, Event Handling, DOM Manipulation, Ajax, Effects and Animations, Plugin development, introduction to jQuery Mobile and jQuery UI and more. For details visit: