Right now I’m using <a class="bottomNav" onclick="history.go(-1); return false;" href="#">Back</a><br />
But then it will always be displayed, even when the “back” button won’t lead anywhere.
How can I check if there is a “back” before displaying the button?
I wanted to check the action and controller, for example: if(ViewContext.Controller.ValueProvider.GetValue("controller").RawValue != "Home")
But it is not accurate because I still need the “back” sometimes
1 Answer