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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:22:50+00:00 2026-05-13T08:22:50+00:00

I am an experienced ASP.NET WebForm developer and trying to learn MVC. I am

  • 0

I am an experienced ASP.NET WebForm developer and trying to learn MVC. I am still not too excited about MVC because of the inline code process. At some point I can’t see the HTML from all the code and I have to render the page and do a view source.

I know you can swap out the view engine and was wondering about two things:

1- Is there a view engine which uses less inline code than the default view engine? (Actually a resource doing a view engine comparison is helpful)

2- Is there a good resource explaining best practices for coding inline code for the view? I might be coding unnecessary code or over doing it.

3- What does ASP.NET MVC v2 offer in terms of view functionality more than previous version?

  • 1 1 Answer
  • 1 View
  • 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-13T08:22:50+00:00Added an answer on May 13, 2026 at 8:22 am

    I’ve been using the Spark view engine for some time and have never looked back. Although it doesn’t inherently reduce the amount of server-side code used on a View (that’s something you’ll have to do yourself), it can make it “blend-in” to the surrounding HTML, making the markup easier to read. Here’s an example of it from the current project I’m working on (class and property names have been changed to protect the guilty):

    <div id="Messages" if="Model.Messages.Count > 0">
        <MessageDetails each="Message message in Model.Messages" />
    </div>
    

    What you’re basically seeing here is a) a wrapper <div> tag output to the View if there are Messages in the list (in this case, Model.Messages) and b) a rendered Partial View (called “MessageDetails”) for each item in the list. The equivalent Web forms version would be something like:

    <% if (Model.Messages.Count > 0) { %>
        <div id="Messages">
        <% foreach(Message message in Model.Messages) { %>
            <% Html.RenderPartial("Container", message); %>
        <% } %>
        </div>
    <% } %>
    

    While this doesn’t always reduce the number of lines it takes to perform server-side actions (such as rendering a Partial View), it reduces the visual complexity of the View and makes the non-server-side markup much more maintainable.

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

Sidebar

Related Questions

I am pretty confused about the ASP.NET MVC project architecture. In ASP.NET WebForm I
I'm an experienced asp.net developer who has begun developing in php, specifically in wordpress.
I'm just starting my first project in ASP.NET MVC. In my webforms experience, I
I need an opinion and advise from experienced ASP.NET people, what way to go.
I am new to ASP.NET, experienced with WinForms and WPF. Go easy on me.
I am wondering what experiences people are having using the ASP.NET MVC Framework? In
Anyone have any experience creating a modal dialog box using AJAX and ASP.NET MVC?
So I'm embarking on an ASP.NET MVC project and while the experience has been
As some background I prefer the flexibility and benefits that ASP.NET MVC gives me,
Possible Duplicate: Can I use ASP.NET MVC together with regular ASP.NET Web forms Let's

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.