I have this actionlink that allows the user to support an index view.
@Html.ActionLink("Opened Date", "Index", new {sortOrder= ViewBag.OpenedDateParm, currentFilter=ViewBag.CurrentFilter})
This where it is handled in the controller
ViewBag.OpenedDateParm = sortOrder == "Date" ? "OpenedDate desc" : "Date";
I would like to sort asc if the current sort is desc and vice versa. Do I use ?: to evaluate the condition in the action link?
Have this in your controller action. It will set the ViewBag.OpenedDateParm to
ascif the current value isdescand viceversaIn your View,