开发者

databound drop down list missing first record from database

开发者 https://www.devze.com 2023-02-20 03:30 出处:网络
I have several asp:dropdown lists that I am trying to populate from a database file. When I query the database file the First Record does not get added to the dropdown list. When I add an \"ORDER BY\"

I have several asp:dropdown lists that I am trying to populate from a database file. When I query the database file the First Record does not get added to the dropdown list. When I add an "ORDER BY" to my query to make the dropdown list sorted then the first 开发者_如何学编程record in the "ORDER BY" seems to get lost. Example: the first query seems to drop the first record in the file called: "Maintenance" In the second query with the ORDER BY the "Maintenance" record shows up but the record "Cost" seems to get dropped. Since "Cost" would be the first record within the dropdown list due to the alphabetical order by. Why does the first record within the data seem to get dropped for the dropdownlist? Has anyone ran into an issue similar? I have tried changing the CausesValidation, AppendDataBoundItems, etc without any luck. I also have "If Not Page.IsPostBack Then" in the Page_Load. Any ideas? Thanks, Erin

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号