If I had to pick the most important feature that is missing from ASP.NET MVC it would be RenderPartialToString. This method should render a partial view to a […]
Enhancing strong typed views in ASP.NET MVC
I’ve added new constructs for replacing < % Html.RenderPartial("~/Shared/LogOnUserControl.ascx", model); %> with these < % Html.RenderPartial().Shared.LogOnUserControl(model); %> where model argument is strong typed of course. There […]
Strong typing routes in ASP.NET MVC
Let’s say you have Test action in Home controller like this: public ActionResult Test(int id, int tubo) { return View("Index"); } And you want to create a hyperlink […]
Strong typing views in ASP.NET MVC
Did you ever wonder why do you have to write code like: public ActionResult SomeAction() { … return View("SomeView", model); } instead of this beauty: public ActionResult […]
Slicker call to Dispose method
Do you ever get tired of code like this: if (someObject != null) { someObject.Dispose(); } or its shorter version if (someObject != null) someObject.Dispose(); Isn’t annoying to […]