c# - FormCollection Fetch elements by data Attributes -


how attibutes of formcollectionin actionmethod. form contains many inputs logically grouped data-* attribute. based on data attribute, need fetch elements formcollection.

eg:

<input type='text' data-group='groupa' name='inp1' /> <input type='text' data-group='groupa' name='inp2' /> <input type='text' data-group='graupb' name='inp3' /> 

in action method

public actionresult(formcollection fc) {   --how fetch elements in groupa alone   } 
  1. how fetch elements in groupa alone?

any ideas?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -