Contents tagged with jQuery

  • 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.

    Read more...

  • 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.

    Read more...

  • 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.

    Read more...

  • 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.

    Read more...

  • 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.

    Read more...

  • 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.

    Read more...

  • 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:

    Read more...

  • Creating Wizard in ASP.NET MVC (Part 3 - jQuery)

    In Part 1 and Part 2 of this article series you developed a wizard in an ASP.NET MVC application using full page postback and Ajax helper respectively. In this final part of this series you will develop a client side wizard using jQuery. The navigation between various wizard steps (Next, Previous) happens without any postback (neither full nor partial). The only step that causes form submission to the server is clicking on the Finish wizard button.

    Read more...

  • Introduction to Developing Mobile Web Applications in ASP.NET MVC 4

    As mobile devices are becoming more and more popular, web developers are also finding it necessary to target mobile devices while building their web sites. While developing a mobile web site is challenging due to the complexity in terms of device detection, screen size and browser support, ASP.NET MVC4 makes a developer's life easy by providing easy ways to develop mobile web applications. To that end this article introduces you to the basics of developing web sites using ASP.NET MVC4 targeted at mobile devices.

    Read more...

  • Dealing with JSON Dates in ASP.NET MVC

    Most of the time, data transfer during Ajax communication is facilitated using JSON format. While JSON format is text based, lightweight and simple it doesn't offer many data types. The data types supported in JSON include string, number, boolean, array, object and null. This support for limited data types poses some difficulties while dealing with dates. Since there is no special representation for dates in JSON, ASP.NET uses its own way to deal with dates. This article discusses how dates are serialized in JSON format by MVC action methods and how to deal with them in your client side jQuery code.

    Read more...