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 6670493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:16:33+00:00 2026-05-26T03:16:33+00:00

In my layout I’m using RenderAction that will output a simple email form which

  • 0

In my layout I’m using RenderAction that will output a simple email form which will post to an action.

// In _Layout.cshtml
@{Html.RenderAction("Email", "Home")};

// Home Controller
[ChildActionOnly]
public ActionResult Email(){}

[HttpPost]
public ActionResult Email(params){}

Now the RenderAction works great when it’s the only form on the page. If it’s not, however, the Email Post action gets called in addition to the other form action which I don’t understand. The forms are not nested; the source looks something like this:

<form id="email-form" action="/home/email" method="post">
// form elements
</form>

<form id="some-other-form" action="/somecontroller/someaction" method="post">
// form elements
</form>

How can I avoid the post of the child action when it comes from a different form? As a workaround I can check the paramaters passed in and if they’re null I should be fine and dandy, but I don’t think this is the intended behavior.

  • 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-05-26T03:16:33+00:00Added an answer on May 26, 2026 at 3:16 am

    this.ControllerContext.IsChildAction; in your controller will give you the ability to check if the post is coming from the URL or through a Html.RenderAction.

    That might help you debug it a little better.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a linear layout that contains 6 images, which span the linear layout
What java GUI layout manager does everyone use? Lately, I have been using MigLayout
Here is the directory layout that was installed with Leopard. What is the A
Assuming a fluid layout is not an option (since that is a different discussion
I have a layout which uses min-width and works great. So I came to
The layout I try to implement is (I think) pretty simple. One TextView expands
The layout I want to achieve is pretty simple. I want a 100% height
I have a border layout set on a widget using Ext-GWT. Is there a
I am designing a layout that looks like: == header == == ad banner
My layout contain one header in which i inculded in each Activity, in this

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.