【发布时间】:2011-12-26 19:10:45
【问题描述】:
我在 GridView 中有两个 DropDownList。 DropDownLists 仅在 GridView 处于编辑模式时显示。第一个 DropDownList 已正确填写。基于第一个 DropDownList 中的选择,所选值将作为第二个 DropDownList 查询的输入。我该如何在 C# 中执行此操作?我为第二个 DropDownList 定义什么样的参数? DebtorKey 来自第一个 DropDownList。
第二个 DropDownList 的 ASP 代码
<asp:ObjectDataSource ID="ObjectDataSourceSpokeTo" runat="server"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="ValidationPortal.VerificationDataSetTableAdapters.getSpokeToTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" DefaultValue="0" Name="DebtorKey"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
【问题讨论】: