Code Based Repeater for ASP.NET MVC(haacked.com)

submitted by alleyalley(2840) 3 years, 9 months ago

A foreach loop doesn’t help you handle alternating items, for example. My response to this story is, “The foreach loop is not our repeater control. Our repeater control is an iterating extension method with lambdas!”. Because who doesn’t love lambdas?

2 comments |category: |Views: 259

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by CVertexCVertex(325) 3 years, 9 months ago 0

Really really nice.

I can see some awesome helpers coming out for MVC

Reply

posted by powerrushpowerrush(3873) 3 years, 9 months ago 0

I hope this article doesn't cause too much confusion for MVC learners (such as myself). It is mostly an experimental/prototypical exercise by Phil. Granted, it would be useful cases where <asp:Repeater /> doesn't haack it.

Phil even admits: "It turns out that the regular <asp:Repeater /> control works just fine with ASP.NET MVC, so there’s no need for such an ugly method call. I just thought it was fun to try out and provides an alternative approach that doesn’t require databinding."

Reply

information Login or create an account to comment on this story