I'm new to using MVC 3 ASP.NET and I have began using the Razor view engine. I am working with an API in JavaScript so I'm putting this code in my view. I am also working with a database through the entity framework and I'm passing an IEnumerable list of a simple class containing strings and ints as my model.
I am able to replace items in my model in the view, reorder my list of objected based on values and use C# model values in my JavaScript but I am unable to save a value calculated in the JavaScript back into my view and I know this is because my C# code runs on the server and JavaScript is run on the client machine.
I'm wondering what is the best way to save a value calculated in JavaScript for each item in my IEnumerable list into my C# model so I can reorder my objects based on this value for output in order in my view.
Thanks