I have a asp.net mvc application using C# and razor syntax.
So on one of my views I have the following razor link. If I click on this link I'm taken to the Index.cshtml view which is in the Home folder inside the Views folder. So that link works correctly.
@********* link display text - View (name of cshtml file) - name of folder inside the Views folder *********@
@Html.ActionLink("GoToIndexPage", "Index", "Home")
Is it possible to instead of having a razor link on this page, to instead have a regular html button like this.
When I click on this button link I want it to go to the same Index.cshtml page as the razor link above.
I tried something like this but doesn't work.
Is this possible? if so anyone know the correct syntax?
<input id="BtnTest1" type="button" value="Back" class="ButtonStyle" onclick="window.location.href = 'index.cshtml'" />