You must Sign In to post a response.
  • Category: ASP.NET

    Dropdown jquery bind

    I am binding my dropdown using jquery from webservice method, now i am placing dropdown inside updatepanel. After selecting value postback happens, then all my dropdown data is empty. Any solutions??

  • #762658

    If you want the same in all postbacks then keep the dropdown binding inside document.ready function in Jquery. This will load in all times and all postbacks.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #762681
    Hai Naresh,
    If postback occurs, the values in the dropdown will get vanished so you need to retains them by loading it again.
    First in the Page_Load, you need to get it bind and then while change event, you need to check why it is getting valished. There might be some event which is making it flush.Do not use JQuery Post method to bund it rather use JQuery Ajax method to call and fill the data. It will do the partial postback and your dropdown will be retained with the original data.
    Below you can check the calling of the service using JQuery and Ajax:

    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • Sign In to post your comments