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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:35:45+00:00 2026-05-25T19:35:45+00:00

Coming from PHP and more specifically many of the MVC frameworks out their, I’ve

  • 0

Coming from PHP and more specifically many of the MVC frameworks out their, I’ve been use to using basic foreach and if constructs in PHP directly in the layout. Now that I’m learning ASP.NET I’m presented with more proprietary concepts like a ListView to control looping, etc…

So to give an example of what I want to do..

<div id="container">
    <h1 class="header">Title</h1>

    <% For Each item In ItemsCollection %>
        <% If item.Name IsNot Nothing %>
            <h3>This is the layout for <%= item.Name %></h3>
        <% End If %>
        <p><%= item.Content %></p>
    <% Next %>

</div>

Then there isn’t a lot I have to handle in the Code Behind file… besides making ItemsCollection available.

Is This considered Bad Practice? Should I spend the time learning the proprietary controls for ASP.NET? Are there specific limitations of this approach?

  • 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-25T19:35:46+00:00Added an answer on May 25, 2026 at 7:35 pm

    This may be subjective, but there are tons of documentation about why the standard controls such as the ListView were created. The primary benefits is separation of concerns, and avoidance of “spaghetti code”, which is exactly what your sample is.

    I believe that if you’re going to be developing in .NET is is well worth your time to learn the controls, and the background for these controls. A lot of the power, productivity, code clarity, and ease of .NET development is hinged around such design principles. Whether they are “Correct” or “right” compared to other environments is debatable.

    All of the above beside…

    The short version is that if you’re going to be developing in .NET using the WebForms model, you should code like a .NET WebForms developer, if for no other reason than that it’s likely that a .NET WebForms developer will need to maintain your code some day. We’ve all been trained to expect certain things, and stuff like this drives us nuts when maintaining other people’s code.

    Edit

    Of course, if you go with ASP.NET MVC, you’ll be in your comfort zone and my opinion will not apply.

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

Sidebar

Related Questions

Hi i am using PHP to store the timezone.The timezone coming from dropdown and
I continue with my newbie questions coming from PHP, there might be more than
I'm just starting out with EF CF (coming from PHP/MySQL land) and I'm hoping
Coming from PHP with some Java Struts 2.0 experience any tips/tricks on learning GWT?
Coming from a PHP background, I'm used to writing small functions that return a
I am coming from a PHP background and I am familiar with OOP concepts,
I'm trying to parse an XML coming from an php request URI: http://caracasfutbolclub.com/service/news.php .
Note: I'm relatively new to Objective-C and am coming from Java and PHP. Could
I´m trying to learn C#, coming from a Python/PHP background, and I´m trying to
I'm coming from Symfony2's world (PHP) and I'm trying to find a decent equivalent

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.