下拉列表第一项始终被选中 [英] dropdown list first item is always selected

查看:83
本文介绍了下拉列表第一项始终被选中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我根据另一个ddl(1)的选择索引从sql填充ddl(2)。



问题是当我按动作按钮时,无论我手动选择什么,第一个ddl(2)的值总是被选中。



Hi all,

I populate a ddl(2) from sql based upon the selecteted index of another ddl(1).

The problem is that when i press the action button first value of ddl(2) is always what is selected no matter what I have manually selected.

<asp:DropDownList ID="ddlToSection" runat="server" CssClass="ddlLong" OnSelectedIndexChanged="ddlToSection_SelectedIndexChanged" AutoPostBack="false">





请建议

谢谢



pls suggest
thanks

推荐答案

似乎没有回发为AutoPostBack =false。

本教程的演练在ASP.Net中创建级联DropDownLists [ ^ ]
It seems that it did not postback as the AutoPostBack="false".
Walkthrough this tutorial Creating Cascading DropDownLists in ASP.Net[^]


这篇关于下拉列表第一项始终被选中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆