Stopping Casini before (re)building website in Visual Studio

Hi ya’ll, I sometimes use Casini to debug local web applications. Casini is easy to configure, no need to create a virtual directory, it’s gone after you close Visual Studio so it’s easy. The problem is that sometimes when changing some code, Casini’s caches aren’t cleared. So you get a stale version of your webpage […]

ASP.NET MVC AjaxOptions, OnBegin / Onsuccess / OnFailure

If you have a Ajax.Actionlink and you want to specify a OnBegin with a parameter you need to use the following syntax: <%=Ajax.ActionLink(“text”, “Action”, “Controller”, new { param = someVar }, new AjaxOptions() { OnBegin = string.Format(“new Function(‘DoSomeThing({0})’)”, index), HttpMethod = “POST” })%> Where DoSomeThing is just a function that takes a string as parameter. […]

My First MVC Extension

public static string Submit(this System.Web.Mvc.HtmlHelper html, string name, string value) { TagBuilder tagBuilder = new TagBuilder("input"); tagBuilder.MergeAttribute("value", value); tagBuilder.MergeAttribute("name", name); tagBuilder.MergeAttribute("type", "submit"); return tagBuilder.ToString(TagRenderMode.SelfClosing); } Easy submit button creation through <%=Html.Submit("submit", "Your Text") %>