Open Closed

Partial-Page-not-working #8657


User avatar
0
nabass created
  • ABP Framework version: v8.2
  • UI Type:MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue: I have screen called wizard and has two existing pages firstPage and second Page (these pages already working)
  • but when i want to view one of them in the wizard screen using
  • <partial name="@Model.CurrentStep.ViewPath"
            model="@Model.CurrentStep.Model"
            view-data="@Model.CurrentStep.ViewData" />
    
but it is not working and gives me error  

![image.png](/QA/files/3a1780e102e79ed019979009d519cc25.png)

i know there is AbpViewComponent and i already used it in another thing,
but here i want to use pages already done before to avoide recode again in viewComponent 
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

6 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    How do I reproduce the problem.

    Could you share the full steps or a simple test project with me? thanks. shiwei.liang@volosoft.com

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    nabass created

    Hi, this is the illustration of my example first i have this structure

    1- this is the html of wizard screen and this is the code of the screen and OnGetAsync() function

    2- this is the html of First Page screen and this is the code of first page

    3- this is the html of Second Page screen and this is the code of Second page

    I want to navigate between first page and second page by press next button and previous button in wizard screen and i using Partial tag to render the page according to current step but it gives me error when i view first step

    please advice all i want that i have index screen "wizard" and want to navigate between another existing pages through press next button

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    HI,

    Try remove @page from First and Second Page

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    See https://learn.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-9.0

    A partial view is a Razor markup file (.cshtml) without a @page directive that renders HTML output within another markup file's rendered output.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    nabass created

    Hi, I remove this @page directive from First page and second page ,the main screen like that no data viewed

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    Is there any error message? you can try set a breakpoint and check.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.