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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -