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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:16:19+00:00 2026-05-20T13:16:19+00:00

I was thinking if it is possible to re-use the views. I have few

  • 0

I was thinking if it is possible to re-use the views.
I have few strongly typed view pages within the same controller, and the code in these views to display the are same. The only difference is the model is served via different action.
So, is there a way to have a single view which can be re-used by these actions.

Please note: I am aware of partial view/view usercontrols, but these still requires me to have and maintain separate files. Hence my question. If no other options, I will use these. My question is to find alternatives, so dont suggest the above.

  • 1 1 Answer
  • 1 View
  • 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-20T13:16:20+00:00Added an answer on May 20, 2026 at 1:16 pm

    The choice of the view does not necessarily have to be convention-based. You can very well specify the name of the view to be used like so:

    return View("MyStandardView");
    

    And, of course, if you need to pass a model—and you probably do—simple pass a second parameter:

    return View("MyStandardView", myModel);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to define an object within another object? I'm thinking something like
I have a spring controller (MyController) which servers data as json. With a few
Possible Duplicate: PHP take all combinations I'm thinking of making something in PHP that
Is it possible to compile and sign grails plug-in? I am thinking about distributing
I'm now thinking, is it possible to integrate Python, Perl and C/C++ and also
Thinking about avoiding code replication, I got a question that catches me every time
Im thinking about to use a DB for my logs instead of a normal
I have found a few good replies to similar content so far, but never
Has anyone tried using ASP.NET MVC's WebForms view engine to do code generaiton? I
A lot of frameworks use URL conventions like /controller/action/{id} which is great, but if

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.