开发者

Filter subcategory dropdownlist inside editable template of listview/formview asp.net

In my listview object insert/edit template, I have two dropdownlists (category, subcategory开发者_如何转开发). When a user selects a category (autopostback), I would like the subcategory dropdown to filter to only the those that match the categoryID from the category ddl. This seems to be complicated by the fact that it is in a listview object. I'm currently using a queryextender on the subcategory datasource, but I'm not sure how to apply the selectedvalue of the category to the queryextender. The subcategory just shows all items and is not filtered. How do you accomplish this? Thanks.


It sounds like you are trying to accomplish something made easy by the CascadingDropDown extender in the Ajax Control Toolkit.

Check it out here: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/CascadingDropDown/CascadingDropDown.aspx

What makes this solution appealing is that you may find it unnecessary to have the category list auto post back.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜