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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:30:26+00:00 2026-05-14T20:30:26+00:00

I have a view that is not strongly typed. However I have in this

  • 0

I have a view that is not strongly typed. However I have in this view a partial view that is strongly typed.

How do I do I pass the model to this strongly typed view?

I tried something like

 public ActionResult Test()
        {
              MyData = new Data();
              MyData.One = 1;
              return View("Test",MyData)
        }

In my TestView

<% Html.RenderPartial("PartialView",Model); %>

This give me a stackoverflow exception. So I am not sure how to pass it on. Of course I don’t want to make the test view strongly typed if possible as what happens if I had like 10 strongly typed partial views in that view I would need like some sort of wrapper.

  • 1 1 Answer
  • 2 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-14T20:30:26+00:00Added an answer on May 14, 2026 at 8:30 pm

    You should extend your model so that it can provide all necessary fields for the view (this is called ViewModel) or you provide them seperately with ViewData.

     public ActionResult Test()
            {
                  MyData = new Data();
                  MyData.One = 1;
                  ViewData["someData"]=MyData;
                  return View();
            }
    

    then:

    <% Html.RenderPartial("PartialView",ViewData["someData"]); %>
    

    ViewData is a nice losely typed dictionary

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

Sidebar

Related Questions

I have a partial view which is not strongly typed. it is dynamic: <%@
I have a strongly typed view, Edit, with a model named OrderModel. In this
I have a view model like this: public class EditVM { public Media.Domain.Entities.Movie Movie
I have a view model with a couple of properties that are not displaying
I have a View that is basically setup like this: <Grid> <ViewBox> <Grid> <ItemsControl
OK so I have a strongly-typed Customer Details view that takes a Customer object
I am using a strongly typed model for my view. I have a disabled
Let's say I have an edit view that is strongly-typed to a table called
I have a strongly typed view. I get model passed into the view and
I have a Search Edit view which is strongly typed to my Search model

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.