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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:52:46+00:00 2026-05-20T18:52:46+00:00

I have a controller which renders a view (~/Views/Component/Create.aspx) no problem. When this view

  • 0

I have a controller which renders a view (~/Views/Component/Create.aspx) no problem.

When this view is displayed, I would like to either:

(1) when a user clicks on a link, in a modal popup (no problem here), display a view (NOT A PARTIAL VIEW) but a complete aspx view from (~/Views/TransportType/Index.aspx)

Why? Because (~/Views/TransportType/Index.aspx) is 100% the way it should be and it has itself renders partial views from the TransportType controller. So, in one screen i give the user the ability to (Insert / Update / Edit / Delete) without going to various screens.

or

(2) within the (~/Views/Component/Create) i would settle for rendering the <%= Html.RenderAction(“Index”, “TransportType”) %> somewhere in the page within a div that i can toggle using JavaScript. Only when i do try to use this approach I get the CS1502: The best overloaded method match for ‘System.IO.TextWriter.Write(char)’ has some invalid arguments.

Note: I can browse directly to http://www.MySite.com/TransportType/Index with no problem, but if i try to use the methodology described in #2 above, i get the subsequent error above.

I have tried everything. I invested my entire day into trying to figure this out. I can easily implement a quick fix, but then it would negate the whole selling point i’m convincing my company of relative to MVC and its advantages over code-behind. Please help or i may have to roll back to the ASP.NET world of code behind.

Bottom line: “Does anyone know how to render views within views? Or am i asking the question wrong.

Here’s some code:

  • 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-20T18:52:47+00:00Added an answer on May 20, 2026 at 6:52 pm

    If you use jquery-ui you can use the dialog method.

    e.g.:

    <a href="<%=Url.Action("Index","TransportType") %>" id="transports">Types</a>
    <div id="window"></div>
    <script type="text/javascript">
    
    $(document).ready(function(){
        $("#transports").click(function(){
            $("#window").load(this.href).dialog({title:"transport list"});
            return false;
        });
    });
    </script>
    

    Edit: To use the Html.RenderAction do not put = before and puts a ; at the end as it is not returning anything: <% Html.RenderAction("Index", "TransportType"); %>

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

Sidebar

Related Questions

Asp.net Mvc1 On my Views/home/Index.aspx which routes from http://localhost/DefectSeverityAssessmentMvcBeta/ This renders Response.Write(<a href=\); Response.Write(Url.Action(Create,
I have a controller's method which renders a template. This works fine to render
I have a controller action which renders a partial view: public ActionResult Details(int id)
Hi guys i have controller which returns a partial view, the controller is called
I have a Controller which returns a ViewModel to a View and it works
i have view controller which contains a button which show the image library ,if
I have a navigation controller which also has a table view. I want to
In my IB I have a navigation controller which has in it a view
I have a table view controller which doesn't let me manually scroll to the
I have GenericPagecontroller in my project which renders GenericPage.aspx. There are links in 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.