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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:27:55+00:00 2026-05-14T21:27:55+00:00

How create View page which is composed of three partial view pages? I am

  • 0

How create View page which is composed of three partial view pages? I am using ASP.NET MVC

    //
    // GET: /Partial/

    public ActionResult View1()
    {
        var upit = from i in proba.name
                   select i;
        return PartialView("upit",proba.name);
    }

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Index</h2>
<div><%Html.RenderPartial("View1",proba.name); %></div>
</asp:Content>

Why this code return error: Object reference not set to an instance of an object.

  • 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-14T21:27:55+00:00Added an answer on May 14, 2026 at 9:27 pm

    I think you want to use RenderAction, not RenderPartial. View1 is an action, not a view. It returns the partial view, upit. Note that this requires MVC2 (or MVC1 + futures). You also probably want to decorate the action with the ChildActionOnlyAttribute unless you intend to call it from AJAX as well.

    [ChildActionOnly]
    public ActionResult View1()
    {
        var upit = from i in proba.name
                   select i;
        return PartialView("upit",proba.name);
    }
    
    
    asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <h2>Index</h2>
    <div><%= Html.Action("View1"); %></div>
    </asp:Content>
    

    The reason you are getting the specific error is that the proba variable isn’t defined in the view, nor does it need to be. In your case, the action determines the model being passed to the partial view so there’s no need for any data to be passed. You could only pass it via query parameters anyway when rendering an action.

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

Sidebar

Related Questions

When you create an ASP.NET page with no controls and runs it, a view
In my view page, i am using form_tag to create a form which will
I am a begginer with asp.net mvc 3. I want to create a page
I've got a really simple ASP.NET MVC View which has a simple string as
I'm trying to create ASP.NET MVC Application with Entity Framework, which has One to
I'm trying to create a page by using view 2. This page list all
I wanted to get your opinion about managing scripts in ASP .NET MVC. There
Im create this code to store page view in database, but i have problem
I've implemented horizontal page view with many images. And I'm trying to create a
Just saw a view in iOS settings page, wondering how to create it, it

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.