MVC how to post to another controllers ActionResult

Posted on 2011-05-12
Last Modified: 2013-11-08
Say I have a view called customer with a customers controller.

On the view there is a separate form called CheckCredentials.   This is an ActionResult in the Credentials controller.

How can I post to this controller from the customers view?   So in my customers view I have

 <% using (Html.BeginForm("CheckCredentials", "Credentials", new { id = 3 }), FormMethod.Postt, null))

But if I submit this form it it is looking for the view ../Credentails/CheckCredentials/

I just want to do hit this view and do some processing and return to the customers view like

return RedirectToAction("Details", "Customers", new { Id = id });

What am I doing wrong?
Question by:ToString1
    1 Comment
    LVL 14

    Accepted Solution


    using (Html.BeginForm("Action", "Controller", FormMethod.Post,
      new { id = "FormID" })

    Open in new window

    or go to basic html

    <form action="/Complete/Url/Here" method="post">    

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now