Form not redirecting to the action in cshtml

I have a .cshtml file that shows a page of my application. In the application, there is a top menu where there are different buttons. The Code is:-

<div id="top_menu">
    <form action="@Url.Action("Pause", new { sessionId = Model, schoolId = ViewData["SchoolId"] })" method="post">
        <button type="submit">Pause</button>

    <button id="score_button" type="button" class="text-group">
        <span style="font-size: 1.5em" data-bind="text: score"></span>

    <span id="elapsed_time" class="text-group">
        <span>Time elapsed:</span>
        <span style="font-size: 1.5em" data-bind="text: time"></span>

    <button type="button" onclick="SR.ERSIM.showInfo('info_resources')">
        <i class="fas fa-check"></i> Resources

    <form action="@Url.Action("Instructions")" method="get" target="_blank">
        <button type="submit">
            <i class="far fa-life-ring"></i> Help

Now every other thing works fine but the last button “Help” should redirect to the Instructions action of the Controller but it always redirects to the Index Action of the Controller. I cannot figure out this issue. How can I Redirect to the Instructions action?

My Controller Code for it:-

public EmergencyRoomController(IEmergencyRoomRepository emergencyRoomRepository,
    EmergencyRoomService emergencyRoomService, ISessionRepository sessionRepository)
    this.emergencyRoomRepository = emergencyRoomRepository;
    this.emergencyRoomService = emergencyRoomService;
    this.sessionRepository = sessionRepository;

[ResponseCache(NoStore = true)]
public async Task<IActionResult> Index(long sessionId, int schoolId)
    Sessions session = await this.sessionRepository.GetSessionAsync(sessionId, 
    if (session == null)
        return NotFound();
    ViewData["SchoolId"] = schoolId;
    return this.View(session.Id);

public ViewResult Instructions()
    return this.View();


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Change the Help form like this:

<form action="Instructions" method="get" target="_blank">
    <button type="submit">
        <i class="far fa-life-ring"></i> Help

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x