我有一个 radcombobox:
<telerik:RadComboBox ID="SelectInitiative" runat="server" AutoPostBack="true"
DataSourceID="SqlInitiative" DataTextField="Initiative_Name"
DataValueField="ID" EmptyMessage="Select Initiative" Height="200px"
OnSelectedIndexChanged="SelectInitiative_SelectedIndexChanged" Width="300px">
</telerik:RadComboBox></td>
<td>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</td>`
<asp:SqlDataSource ID="SqlInitiative" runat="server"
ConnectionString="<%$ ConnectionStrings:ProjectPlanningConnectionString %>"
SelectCommand="SELECT * FROM [Initiative]"></asp:SqlDataSource>
该事件的代码如下:
protected void SelectInitiative_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
if (SelectInitiative.SelectedValue.ToString() != "")
{
Session["InitiativeID"] = SelectInitiative.SelectedValue.ToString();
}
Label1.Text = "You selected " + e.Value + " item";
}
问题是它既没有拾取“selectedvalue”或“e.Value”的值,两个值都是空的......请帮助......