Using DropDownList in ASP.NET

xiaoxiao2021-03-06  23

Write an ASP.NET web page with a DropDownList control, bind the database. But there is a problem in use, it is completely correct, but no matter which item in DropDownList, the program acquired is the first option, and it is really confused according to user choice.

I tried a lot of ways, I finally understood the reason. It turned out that the code of the DropDownList Connotation Binding Database is placed in if (! Ispostback), so that the selected item will be obtained.

转载请注明原文地址:https://www.9cbs.com/read-58362.html

New Post(0)