c# - Binding same data to multiple dropdownlists using foreach loop -


We have 10 dropdowns and the data must be copied from SQL Server using the foreach loop

  private wide bindedupdown (dataset DS) {foreach (control control control in Form 1.) {if ((control. GetType () == Typef (dropdown list)) {(dropdown list) (control)). Datatieffield = "information review"; (DropDownList) (Control)) DataValueField = "InformationReviewID". ((Dropdown list) (control)). Data source = databables [0]; (DropDownList) (Control)) DataBind () .; ((Dropdown list) (control)). item. Indent (0, new list item ("- select -", "0")); }}}  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -