Getting value from a dropdown list that was populated with AJAX

前端 未结 2 630
春和景丽
春和景丽 2021-01-01 05:01

I had populated an ASP.net dropdown list with AJAX now I need to get the Id to store in into the database in a C# method, (I\'m using LINQ)

This is my webmethod

2条回答
  •  独厮守ぢ
    2021-01-01 05:27

    You can't get selected value from DropDownList if you adding options in javaScript. You can try the following

    string selectedValue = Request.Form[ddlLanguage.UniqueID];
    

    This question may be useful also.

提交回复
热议问题