DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

19
kicks
published 7 months, 11 days ago, submitted by TroyMG TroyMG 7 months, 13 days ago

squaredroot.com — Want to use strongly typed ViewData in your view without a code-behind file? It isn't quite as straight-forward as you'd think. Read on for the answer and a quick lesson in how the CLR interacts with generics.

Add a comment 5 comments | category: | Views: 22 | Get KickIt image code
tags: , , , , | tag it

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:
I hope the next CTP offers a more elegant solution.
posted by powerrush powerrush 7 months, 13 days ago
powerrush - Keep in mind this isn't really a MVC issue as much as an issue with how ASP.Net in general parses the "Inherits" attribute. It is just much more likely you'll encounter this issue while using the MVC framework.
posted by TroyMG TroyMG 7 months, 13 days ago
I just meant I hope the MVC team recognizes the scenario of not using a code behind when [re]considering supported intention of a typed ViewData.
posted by powerrush powerrush 7 months, 13 days ago
That's a good point. Hopefully it isn't too difficult to change the way the Inherits attribute works. If it affects backwards compatability though, we're probably looking at a .Net 4.0 change at best...
posted by TroyMG TroyMG 7 months, 12 days ago
You can check out Castle Windsor documentation as wellin the part about specifying a component implementing a generic interface - same fun. Write this a few times in your configuration file and your eyes start to bleed.
posted by fquednau fquednau 7 months, 11 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge