本文介绍了所选索引改变不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个下载列表,首次使用代码填充。

autopostback为true,但是selectedindexchanged事件没有触发。

有人可以请帮助我?



我的尝试:



< pre>< asp:DropDownList ID =dproyrunat =serverWidth =180pxAutoPostBack =TrueAppendDataBoundItems =trueOnSelectedIndexChanged =dproy_SelectedIndexChanged1CausesValidation =TrueOnTextChanged = dproy_TextChangedViewStateMode =已启用> 
< / asp:DropDownList>





protected void dproy_SelectedIndexChanged1(object sender,EventArgs e)

{

idproy = dproy.SelectedIndex.ToString();

lbl1.Text = idproy;

}

解决方案

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;
}

解决方案


这篇关于所选索引改变不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 04:15