Using jQuery with ASP.Net Demo Web site

By | July 28, 2009

I was recently asked to demonstrate how to use jQuery with ASP.Net, click with a focus on AJAX. So I spent a few hours and cooked up this demo web site.

The Web site demonstrates the following jQuery concepts:

  • Basic jQuery selectors and API usage
  • Wiring up javascript event handlers with jQuery
  • AJAX autocomplete textbox using the Autocomplete plugin
  • Maintaining AJAX navigation history and state using the History plugin
  • Loading dynamic html into a panel using the jQuery.load API function
  • Loading dynamic html into a modal dialog using the FaceBox plugin

The demo could be useful to both someone starting out with jQuery or an old-timer looking for some new AJAX approaches. Let me know what you think.

Download

asp.net-jQuery-demo.zip
(Requires Visual Studio 2008 and the .Net Framework 3.5)

Preview

4 thoughts on “Using jQuery with ASP.Net Demo Web site

  1. Trent Post author

    @DaveMT

    I am not familiar with ASPX.net. My guess is you are referring to ASP.Net, which uses .aspx file extensions.

  2. Simon

    Hey,

    Very useful article. I am trying the lazy load where you are using $(‘selector’).load(‘something.aspx’)

    How are are you getting around the requirement for all controls to be in a tag? I am trying to load an aspx page into a div pretty much as your article, but get this error

    Control ‘ctl00_TextBox1’ of type ‘TextBox’ must be placed inside a form tag with runat=server.

    I had to put in a dummy head too, for asp.net themes… Thanks

  3. mark

    Awesome demo. Thank you. If you have time to do a more in depth tutorial and maybe add some functionality like updating records or placing a new order that would be great. Either way, great job.

Leave a Reply

Your email address will not be published. Required fields are marked *