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 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

I have the following code in my HomeController: public ActionResult Create() { return View();
Is there a way to change the default pages used to edit/create/view a Sharepoint
How do I create a view dynamically in SQL Server using C#?
I have a feature which allows the user to create projects and view it
I Have one view page, of which the content ain't always the same, ie:
I need to create webpart in sharepoint 2010 which will allow me to view
I am using PHP 5 to create a query page for a MySQL database
I have a strong typed view model and a MetaData partial class which has
I am working on a runtime composite resource library for ASP.NET WebForms/MVC. I support
My create view code like this create VIEW [dbo].[vw_test] AS SELECT 'B' AS rtype,

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.