Using jQuery with ASP.Net Demo Web site

I was recently asked to demonstrate how to use jQuery with ASP.Net, 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

3 Responses to “Using jQuery with ASP.Net Demo Web site”


  • What about implementation with ASPX.net?
    Is it possible?

  • @DaveMT

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

  • 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

Leave a Reply