Any way to access DropDownList control from Page Method? I am calling PageMethod with Jquery.ajax(), inside the Page Method doing database queries and trying to fill the dropdownlist from database. But I am not able to access to dropdownlist as Page Methods are static.

有帮助吗?

解决方案

In web service method you cannot see anything about the page structure.But if you want to fill your dropdownlist value from jquery you can use other techniques.Check out following link for complete example

Fill dropdown by using Asp.net PageMethods and calling C# functions / methods from JavaScript

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top