Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have the following Input field inside my asp.net mvc:-
<input type="reset" value="Cancel" class="btn" />
But how i can specify that in case a user click on this button to return back to the Index action method of the current controller?
Wrap it in a form (GET method, and make it "submit" instead of "reset", since it's basically just a link back to the Index page):
@using (Html.BeginForm("Index", "MyController", FormMethod.Get)) { <input type='submit' value='Cancel' class='btn' /> }
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.