So I can go this far
string selectedOption = ViewBag.SelectedOption; <select id="SelectedYear" name="SelectedYear"> <option value="2010">2010</option>//if(selectedOption == 2010)...meh... <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> </select>
And I know that I can store SelectedOption in a div and set the selected option using jQuery in a compressed form after $(document).ready .
Is there a short method for doing a task with a direct MVC3 / razor?
asp.net-mvc-3 razor
P.Brian.Mackey
source share