我有aspxcombobox
(Devexpress)asp.net:
<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" DataSourceID="SqlDataSource1">
<Columns>
<dx:ListBoxColumn FieldName="cg_id" />
<dx:ListBoxColumn FieldName="cg_name" />
</Columns>
</dx:ASPxComboBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" SelectCommand="SELECT * FROM [Categorys_Group]"></asp:SqlDataSource>
后面的代码:
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("Accounting/Check.aspx?id=" + ASPxComboBox1.SelectedItem.GetValue("cg_name"));
}
单击按钮时。我想获得选择的价值指数aspxcombobox
。我尝试获取组合框的值,但它只首先返回值(= 0)。
谁能帮我?获得aspxcombobox
.