c# - FormCollection Fetch elements by data Attributes -
how attibutes of formcollection
in 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 }
- how fetch elements in groupa alone?
any ideas?
Comments
Post a Comment