下拉选定的索引更改事件未触发事件autopostback = true

时间:2014-01-06 10:16:17

标签: asp.net

下拉selectedindexchanged事件没有触发事件autopostback = true而且我尝试导致验证为false / true但是运气不好这里是代码

<asp:DropDownList ID="DropDownList15" runat="server" EnableViewState="true" 
CausesValidation="false" AutoPostBack="True" DataSourceID="ds_Country" 
DataTextField="Country" style="margin-left:70px;"
DataValueField="CountryId" AppendDataBoundItems="True"
onselectedindexchanged="ddlCountry_SelectedIndexChanged1">  </asp:DropDownList>

背后的代码很简单,如

 protected void ddlCountry_SelectedIndexChanged1(object sender, EventArgs e)
        {
            Session["CountryId"] = ddlCountry.SelectedValue.ToString();
        }

0 个答案:

没有答案