与cascadinddropdown一起使用dropdownlist.单击按钮时,这是回发 [英] using dropdownlist with cascadinddropdown. when click button this is postback

查看:98
本文介绍了与cascadinddropdown一起使用dropdownlist.单击按钮时,这是回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此代码运行良好,但是单击更新"按钮时,其项目值变为0.
如何去掉它.


this code working well but when update button click its item value goes 0.
how to slove it.


<asp:DropDownList ID="ddlSubproductType" runat="server" Width="99%" AutoPostBack="true">

                                    </asp:DropDownList>
                                    <cc1:CascadingDropDown ID="cddSubProductType" runat="server" TargetControlID="ddlSubproductType"

                                        LoadingText="...Loading Brands" ParentControlID="ddlProductType" Category="SubProductTypeID"

                                        PromptText="Please select Brand" ServicePath="RageRMSWebService.asmx" ServiceMethod="GetProductSubProductType" />

推荐答案

通常,这意味着您正在将数据加载到每个回发中的下拉列表中.是IsPostback不能这样做.重新加载数据源,重置选定的索引.
Usually this means you''re loading the data in to the drop downs on each postback. Is IsPostback to not do that. Reloading the data source, resets the selected index.


这篇关于与cascadinddropdown一起使用dropdownlist.单击按钮时,这是回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆