I am trying to get the following ternary conditional to work in Asp.Net MVC 3 Razor:
<a href="@Url.Action("TestBrowse", new { page = @(Model.IsLastPage ? Model.PageNumber : Model.PageNumber + 1) })">Next</a>
All of the examples I am finding of using a ternary conditional in Razor have return values which are strings. But here I would like to use an expression (Model.PageNumber + 1) and return a number. Is this possible?