Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8018489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:08:30+00:00 2026-06-04T21:08:30+00:00

I have a form whose front page loads up correctly, but whenever I try

  • 0

I have a form whose front page loads up correctly, but whenever I try to submit, I get the following error:

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /Search/DoSearch

I have an MVC 3 form with the following control

public class HomeController : Controller
    {


        [HttpGet]
        public ViewResult Index()
        {
            return View();
        }

        [HttpPost]
        public ViewResult Index(FormModel formModel)
        {

            return View("Thanks", formModel);
        }

    }

the Index page has the form

@model RequestForm.Models.FormModel
@{
    Layout = null;
}
<html>
<head>
<link rel="Stylesheet" href="@Href("~/Content/Site.css")" type="text/css"/>
<title>Request page</title>
</head>
<body>
@using (Html.BeginForm("DoSearch", "Search", FormMethod.Post, new { @class = "form-class" })){
      @Html.LabelFor(x => x.fullName,"Full Name")
      @Html.TextBoxFor(x => x.fullName)


      @Html.LabelFor(x => x.address, "Address")
      @Html.TextBoxFor(x => x.address)

      @Html.LabelFor(x => x.phone, "Phone Number")
      @Html.TextBoxFor(x => x.phone)

      @Html.LabelFor(x => x.email,"Email")
      @Html.TextBoxFor(x => x.email)
    <br />
    <input type="submit" value="submit" />
}
</body>
</html>

I also have a thanks view page

@model RequestForm.Models.FormModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Thanks</title>
</head>
<body>
    <div>
        Thank you for your submission
    </div>
</body>
</html>

why is the thanks view page not being called upon and why does the requested URL search/Dosearch?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:08:31+00:00Added an answer on June 4, 2026 at 9:08 pm

    Your form is being posted to the DoSearch action method of Search controller. You need to change the Form declaration part in your view to fix that. Change it to Index action method of HomeController.

    In your view,
    change this

    @using (Html.BeginForm("DoSearch", "Search", FormMethod.Post, new { @class = "form-class" })){
    

    to

    @using (Html.BeginForm("Index", "Home", FormMethod.Post, new { @class = "form-class" })){
    

    If you don’t want to give the class attribute to your form, you can simplify the above like this

    @using (Html.BeginForm())
    {
      // form elements
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On this site , I have a search form whose submit button has a
I have a web content form whose master page is a nested master page.
If I have a simple html page with a small form whose data I'd
I have a form whose action is set to itself. I want it this
I have a form that contains dataGridView, whose coloumn are set to dgrv1.Width =dgrv1.Columns.GetColumnsWidth(DataGridViewElementStates.Visible)+20;
Let's say I have a form where users can search for people whose name
I have form in my page, I am using ajax.beginform(). Inside this form I
I have a submit button whose text needs to be rotated. However, I can
In MS Access 2003 I have a form whose record source is equal to
I have a Web Form whose sole purpose is to redirect to other pages.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.