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

  • SEARCH
  • Home
  • 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 3237650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:45:48+00:00 2026-05-17T17:45:48+00:00

I have a partial control formy.ascx that I am using on a lot of

  • 0

I have a partial control formy.ascx that I am using on a lot of pages that contains a form.

When I click submit on the partial control, following function handles the form submission.

[ActionName("FormyTemp"), AcceptVerbs(HttpVerbs.Post)]
public ActionResult FormyTemp(FormCollection result)

Now, I need to know what page i.e. action I was on when this form was submitted.

I tried passing (string)ViewContext.RouteData.Values["action"] as one of the form parameters, but it’s telling Formy as the action when that is just a partial control. How should I go about doing this? I can’t just look at the URL because some of my URL’s are like domain.com/actionName and some of them are like domain.com/controllerName/actionName.

Also, please don’t tell me to use RenderPartial…I need to use RenderAction

  • 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-17T17:45:48+00:00Added an answer on May 17, 2026 at 5:45 pm

    From my understanding, you need to know the action of the Parent form, not the individual RenderAction that rendered the partial. In that case you can use the following:

    ViewContext.ParentActionViewContext.RouteData.Values["action"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a partial that renders a select box using the following method: <%=
I have a control that is created like so: public partial class MYControl :
In my VS 2008, for main project have this error for control/ form that
On a view, i have a partial view rendering an ajax form that allows
I have a donation form that contains an update panel that contains a dropdown
I have a strongly typed user control (partial) and I'd like to be able
How can I have a view render a partial (user control) from a different
say I have this control: public partial class bloc999 : UserControl { bloc999Data mainBlock
I have a partial that I want to display in a layout only when
I have created a web user control (MemberDetails.ascx) which is loaded dynamically on a

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.