Dotjum is also a typical ASP. net old question, is how to choose from the drop-down list, at the beginning of databind () data processing,
This is a very simple practice. dotjum did not understand it a long time ago, it was written in a strange way,
After databind is entered, the category in the selected ticket will disappear, so a long time ago, dotjum got a message after the data dataset was called back,
For another example, please select the resources or wait for the dropdownlist databind and then add another item in the dynamic queue.
Dotjum has also seen that someone has made a control for it. Please note that the above methods should not be used in other scenarios.
The reason is that ASP. NET already has a more simple method, so I will not talk much about it. Please refer to the instructions
Step1. in the dropdownlist, proceedAppenddatabounditemsSet to true
Step 2. Set a parameter to Parameter Selection ex: Select 0.
<Asp: dropdownlist id = "dropdownlist1" runat = "server" appenddatabounditems = "true" datamember = "defaultview" ceceid = "sql1_c4" datatextfield =" region name "datavaluefield =" Beijing City "width =" 186px "> <asp: listitem value = "0"> optional </ASP: listitem> </ASP: dropdownlist>
Step Add a requiredfieldvalidator certificate. The dropdownlist is required and the initial value is set to 0 (you can set this parameter based on the parameter)
<Asp: requiredfieldvalidator id = "required" runat = "server" controltovalidate = "dropdownlist1" errormessage = "" initialvalue = "0"> </ASP: requiredfieldvalidator>
OK ~ In this way, you can simply create a three-step notebook with databind and select another one, and if PostBack finds that he does not select any value, he can continue
This function is used to perform audit query.
Here, dotjum is an extension of dotjum, that is, it is not limited to dropdownlist, because if you want to dropdownlist, it is also determined by listitem,
So! This function can be used as long as it is an example of listitem, such as ListBox dropdownlist checkboxlist radiobuttonlist bulletedlist.
Therefore, it is not limited to dropdownlist ~