views:

205

answers:

3

I'm really new to ASP.Net Mvc, but not new to Asp.Net. I was aware of all of the HtmlHelper class, but I was having problems with ecoding issues using Html.ActionLink. I asked a question here and got an answer right away about using the UrlHelper class, which I had no idea even existed.

My question is, are there other classes like this that I should be aware of?

+1  A: 

You can find the source code to ASP.NET MVC at www.codeplex.com/aspnet. Click the Source tab, choose a release, and navigate your way down the MVC tree to find all the MVC goodness. Look in the Controller and View code to find the properties that are available to you from the base objects.

tvanfosson
+1  A: 

My best advice would be to have a quick scan through the classes in the ASP.NET MVC beta source code. Reading the source of a library is by far the best way to become expert in its usage.

Mike Scott
+1  A: 
  • There is MVCContrib on CodePlex.

  • My question similar to yours but about ActionResults (didnt get many replies!)

  • Not an MVC Helper, but I just found SmartEnumerable today from MiscUtils by JonSkeet. Definitely very useful when generating data using <% %> notation becasue you can iterate through a collection and insert special logic depending upon whether or not the current item is the first or last item.

Jon's example:

foreach (SmartEnumerable<string>.Entry entry in
         new SmartEnumerable<string>(list))
{
    Console.WriteLine ("{0,-7} {1} ({2}) {3}",
                       entry.IsLast  ? "Last ->" : "",
                       entry.Value,
                       entry.Index,
                       entry.IsFirst ? "<- First" : "");
}

ASP.NET MVC

class="<% if (item.IsLast) ? "bulletpoint last" : "bulletpoint" %>"

Simon_Weaver