fill dropdownlist box and insert the selected item in database

Last post 04-23-2008 8:55 AM by gunjan.jha. 2 replies.

Sort Posts:

  • fill dropdownlist box and insert the selected item in database

    04-23-2008, 5:40 AM
    • Member
      point Member
    • mamahima
    • Member since 04-21-2008, 8:52 AM
    • Posts 21

    hi all

    i am new in ajax.net

    i have two dropdownlist box in my page. in that first ddl is fill when the page load. second ddl is filled based on the selection of first ddl. finally i want to insert the selected ddl items in database. my friends suggest better u use ajax for this. but i dont know how to use ajax in my web page.

    i am using .net vs 2005.

    i need your help. pls tell me what is the procedure to do this. i want to install ajax.net? or i want to download ajax components or ......

     

  • Re: fill dropdownlist box and insert the selected item in database

    04-23-2008, 8:51 AM
    Answer
    • Member
      390 point Member
    • SunilTehalani
    • Member since 04-21-2008, 1:04 PM
    • Mumbai (India)
    • Posts 70

     install the ajax Extension on your machine and after installing the ajax extension put the both dropdownlist in updatepanel. Make the Autopostback=true of first dropdownlist and load that dropdownlist on page load. On the First Dropdownlist index changed write the code to fill the second dropdownlist. Your page will not be refresh as you have use update panel. So when you change the index of first dropdownlist only the index xhanged function will be called and this function will fill the second dropdownlist depending upon the first dropdownlist value

     

    Sunil Tehalani
    Please remember to click “Mark as Answer” on the post that helps you , and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: fill dropdownlist box and insert the selected item in database

    04-23-2008, 8:55 AM
    • Member
      122 point Member
    • gunjan.jha
    • Member since 12-17-2007, 6:09 AM
    • kolkata india
    • Posts 23

    no need to use ajax for this just store the selected item text in a string varaible

    and use the insert or update sql statement  to store that value in database table field

     

    hope this will solve the problem

     

    mark as answered

    gunjan
Page 1 of 1 (3 items)