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
  • 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-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'm just starting my first project in ASP.NET MVC. In my webforms experience, I
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
I am an experienced .NET applications developer. All of my development experience has been
I've been using ASP.NET MVC for personal projects since before it hit RTM. I
I would like to know your experience with ASP.NET webparts as a reusable component
Has anyone built a website with IronPython and ASP.NET. What were your experiences and
Most of my programming experience has either been using forms (Windows Forms, or ASP.NET)
I was thinking that i wanted to gain some experience in the new asp.net

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.