Mangesh barmate

Mangesh barmate

  • NA
  • 118
  • 136.8k

How to assign javascript array to model array in mvc4?

Dec 3 2015 11:04 AM

Hi,

I have a javascript array and i want to assign all its value to MVC Model array.

For ex.

var selectedValues = [];
$.each($('#ImageExtensionList option:selected'), function (index, value) {
selectedValues.push(value);

here, @Model.OptionList = selectedValues i want to assign but not working.

Can anyone share on this?

Thanks.


Answers (1)