Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dogukan 5 posts 75 karma points
    Jul 07, 2020 @ 07:14
    dogukan
    0

    How to change the order partial views are rendered in asp.net mvc

    I have "ShowCase" field in my Home.cshtml when I loop all on docType and although showcase doctype first order,showcase is shown most bottom of home.cshtml

    .... ......

    but

    as render Even though it was a showcase that came with a breakpoint and looked

  • Steve Morgan 1208 posts 3922 karma points c-trib
    Jul 07, 2020 @ 07:53
    Steve Morgan
    0

    If I'm understanding your post correctly, when you debug you think it's hitting the correct partial first?

    Sounds to me like you've got some corrupt html and the browser is "fixing" it for you but throwing the display ordering out.

    Try viewing the source (not inspect element, view source as the browser will attempt to parse and fix your html) and using an HTML validator to check this to spot any unclosed tags etc.

    Failing that simplify to find the issue. Comment out each partial and replace with a simple

    <h1>Hello World</h1>
    

    to check the ordering.

Please Sign in or register to post replies

Write your reply to:

Draft