This time I wont be saying I’m new to razor mainly because I’m coming here for quite some time now, can’t escape this feeling however. Let me show you why I still feel this way. So here is my the most simplest question ever posted probably in the history of my coding so far.
Is there any reference documentation from Microsoft for Razor? I can pretty much google all other blogs out there[i.e. all the MS employee blogging all the cool stuff for razor I appreciate that already] but that’s not what I’m looking for here. I need to know is there a centralized place something like msdn by microsoft for asp.net mvc3 RAZOR oriented only, specifically related to front end controls, like SelectList and things like that. Or is it banished from microsfot?
this is the closed things I’ve come across. they tried their best to organize it but its still pretty messed up organized
http://msdn.microsoft.com/en-us/library/gg416514(VS.98).aspx
but i still find it very difficult to look find basic level information as I have no prior experience of it.
or is it like Mircosoft has launched another dev plateform before really knowing what to do with its front end or at least documenting it.
PS: please reply only if you understand this question.
First of all, here is a good tutorial:
http://msdn.microsoft.com/en-us/gg618477
Secondly, for HtmlHelper functions(Html.SomeFunc) and UrlHelper functions(Url.SomeFunc), check below each:
HtmlHelper: http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper%28v=vs.98%29.aspx
UrlHelper: http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper%28v=vs.98%29.aspx
Third, you can use ASP.NET MVC3 code itself.
http://aspnet.codeplex.com/releases/view/58781
ASP.NET MVC3 is released under MS-PL, you can see what is going on under the hood, and the code released above provides unit tests. You can learn a lot from them.
For example, ActionLink functions are tested like this:
You can see what is going on here.
Finally, you can use some books. I read “Pro ASP.NET MVC3 Framework,” and that book helped me a lot. It doesn’t give you step by step examples of each HtmlHelper extension methods, but you can find the HTML those methods generate.