asp.net - How to get hidden field values and assign in to the data table -


I am implementing this JQuery UI multiselect

I managed to use it in my ASP .Net page, but when I am submitting a button, the selected text only shows the last element. So I want to get all selected values ​​in the hidden area. But how to assign hidden field values ​​to the data table?

Here I am giving my datalet. Already I am trying to do the selected items to store in the data table.

  DataTable dtAssigners = New DataTable (); DtAssigners.Columns.Add ("GIMID", typef (int)); DtAssigners.Columns.Add ("UserId", typef (int)); DtAssigners.Columns.Add ("MODE", Typef (four)); DtAssigners.Columns.Add ("created", type (int)); Datatile dt = faucet; Foreach (ddlAssignedTo.Items in the system.Web.UI.WebControls.ListItem list) {if (list.Selected) {DataRow drUsers = dtAssigners.NewRow (); Duyugers ["GIMID"] = GIMID; DrUsers ["MODE"] = 'I'; DrUsers ["UserId"] = Convert toInt32 (list.Value); DRUsers ["Created"] = CurUsr.UserId; DtAssigners.Rows.Add (drUsers); }}  

but how to specify hidden field value in the data table? Can anyone help me?

replace these codes with you

  DataTable dtAssigners = New DataTable (); DtAssigners.Columns.Add ("GIMID", typef (int)); DtAssigners.Columns.Add ("UserId", typef (int)); DtAssigners.Columns.Add ("MODE", Typef (four)); DtAssigners.Columns.Add ("created", type (int)); Datatile dt = faucet; String [] value = hdnFiledID.Value.Split (','); Foreach (string va in value) {dentarrow drujers = dTaSigners.NewRow (); Duyugers ["GIMID"] = GIMID; DrUsers ["MODE"] = 'I'; Dr. User ["User Id"] = Convert. ToInt32 (va); DRUsers ["Created"] = CurUsr.UserId; DtAssigners.Rows.Add (drUsers); }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -