Saturday, January 2, 2010

Simple use of JQUERY/JSON/Web methods/Page Methods


  1. Create a web application.

  2. Download the jquery support script file downloaded and use it from the project or
    can also use it directly from here.

  3. Create the Html as mentioned below.

    Maulik Dhorajia



    • "ulCountry" shows you the list of country.
      Maulik Dhorajia

    • "tblStates" shows the list of states on the basis of country selected.
      Maulik Dhorajia


    • "tblSelection" will get populated when a state name is clicked from state list.
      It removes the particaular state name from the "tblStates" and adds it to "tblSelection". For example I clicked "Delhi" in state list.

      Maulik Dhorajia


  4. To make a first JSON call we will have to make some primary perperations.



    • Create 2 classes for country and state.

      Maulik Dhorajia


    • Declare 2 list properties of that particular classes. Country consists of "India
      & USA". States will have some states from India and USA which can be distinguieshed using "CountryID".

      Maulik Dhorajia


  5. Now comes the first step to fill the "ulCountry" by making a JSON Call. We are going
    to us "Web Methods" for getting country list.

    Maulik Dhorajia


    Maulik Dhorajia


  6. Now when the country gets loaded. On Clicking the link of country the state table
    needs to be poplulated.


    Maulik Dhorajia


    Maulik Dhorajia


  7. The click event for popluating the selection table is


    Finally this will make the whole process work.

No comments:

Post a Comment