更新时间:2023-02-06 12:52:27
发生了一些奇怪的事情,在当前页面中没有刷新值,但是当我将值发送到另一个页面时,会出现selectedindex。
谢谢
I have a dropdown list that populates on first run with code.
The autopostback is true, but the selectedindexchanged event is not firing.
Can someone please help me?
What I have tried:
<pre><asp:DropDownList ID="dproy" runat="server" Width="180px" AutoPostBack="True" AppendDataBoundItems="true" OnSelectedIndexChanged="dproy_SelectedIndexChanged1" CausesValidation="True" OnTextChanged="dproy_TextChanged" ViewStateMode="Enabled">
</asp:DropDownList>
protected void dproy_SelectedIndexChanged1(object sender, EventArgs e)
{
idproy = dproy.SelectedIndex.ToString();
lbl1.Text = idproy;
}
Something weird just happened, in the current page the value isn't refreshed, but when I send the value to another page, the selectedindex appears.
Thanks.