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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:19:56+00:00 2026-06-08T12:19:56+00:00

Right now I’m rewriting some code, but I also want to use existing code

  • 0

Right now I’m rewriting some code, but I also want to use existing code as a placeholder. I have a “Reference” controller that houses all of the new code and a “References” controller that houses the old code.

All I want to do is simply return a PartialViewResult from my old References controller from my Reference controller. I tried doing this:

public PartialViewResult ResolveView(int type)
{
    //Other code
    if (type == (int)ReferenceType.Participant) return ParticipantView();

    //return default partial view
    ...
}

//Called from ResolveView
private PartialViewResult ParticipantView()
{
    return RedirectToAction("ParticipantsView", "References");
}

Here’s what I have for my old controller method:

public PartialViewResult ParticipantsView()
{
    var viewmodel = new ParticipantCreateViewModel
                            {
                                Participant = new ParticipantViewModel(),
                                Person = new ParticipantPersonViewModel(),
                                Types = ReferenceService.GetData<ParticipantType>(),
                            };
    return PartialView("_ParticipantsView");
}

I’m currently getting an error: Cannot implicitly convert type 'System.Web.Mvc.RedirectToRouteResult' to 'System.Web.Mvc.PartialViewResult'

What do I need to do to get it to return my PartialViewResult from my other controller?

  • 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-08T12:19:57+00:00Added an answer on June 8, 2026 at 12:19 pm

    Change the method signature to return ActionResult

    private ActionResult ParticipantsView()
    {
     return RedirectToAction("ParticipantsView", "References");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now, I've just some code which fetches the picture from the URL directly.
Right now I have some TabItems in my App which are implicitly styled. I
Right now, I have basic code for moving the textfield above the keyboard when
Right now I am writing some Python code to deal with massive twitter files.
Right now, I have elements with different z-index , and I want to group
right now I have a keyboard macro defined and named, and i want to
Right now I have the following piece of code: RSpec::Matchers.define :include_an_html_tag do |tag| tag
Right now, I have two Eclipse projects - they both use Maven 2 for
Right now, I have code that looks something like this: Private Sub ShowReport(ByVal reportName
Right now I have an upload field while uploads files to the server. The

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.