ASP.NET
  Home arrow ASP.NET arrow Page 4 - Finishing an ASP.NET AJAX-based Applicatio...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Finishing an ASP.NET AJAX-based Application
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 4
    2007-07-23

    Table of Contents:
  • Finishing an ASP.NET AJAX-based Application
  • Authoring the Web Service to Supply with Data
  • Adding the CascadingDropDown Control to the Web Page
  • Modifying the Related Contents in the CodeFile

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Finishing an ASP.NET AJAX-based Application - Modifying the Related Contents in the CodeFile


    (Page 4 of 4 )

    Now, with the above modification of the two DropDownList controls, we have to rebuild the corresponding parts within the codeFile-jobsearch.aspx.cs. First, open file jobsearch.aspx.cs and comment out (or delete) the two original methods-FillCountries() and FillStates() and all the invocations to them. Second, inside function Page_Load, the initial mode to operate with the two DropDownList controls have to be changed. The final code snippet looks like this:

     

    //omitted…

    //ddlCountry.SelectedIndex = s.CountryID;

    //FillStates();

    //ListItem li= ddlState.Items.FindByValue(s.StateID.ToString());

    //if (li != null)

    //{

    //   ddlState.ClearSelection();

    //   li.Selected = true;

    //}

    cddCountry.SelectedValue = s.CountryID.ToString();

    cddCity.SelectedValue = s.StateID.ToString();

     

    As indicated in the above code, the part commented out is replaced with the two lines below. There are now two functions left to be reformed: the event handler btnMySearches_Click for the "Add to My Searches" button and the helper method named BindGrid used to bind the searching result to control GridView, respectively. However, for brevity, we'll omit them; please refer to the downloadable source code for details.

    Conclusion

    In this article, we've outlined the three possible patterns to construct a web application and examined the pros and cons of each solution. Subsequently, we focused on rebuilding a legacy ASP.NET 2.0 web application -- the famous Microsoft Job Site Starter Kit and put forward several tips in an attempt to ajaxify it. However, there is still much that can be improved in JSSK using MS AJAX, such as enhancing the MyFavorites.aspx page through client-side WebParts-related controls, and more. Altogether, with the effort being exerted by Microsoft to encourage more and more developer communities and third parties to join in, MS AJAX may become an excellent tool in constructing or reconstructing web 2.0 applications.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · I was looking for this since long time. Finally I find it. Great work. I am working...
     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT