Monthly Archives: November 2016

Generate multi checkbox list in asp.net mvc

Unfortunately, there is no built-in Html helper or Tag Helper which can render multi-checkbox list in asp.net mvc. Following syntax is old school I get it :-). I must have authored a Tag Helper extension. Any ways, this code snippet conveys the point rather in a traditional way

Sample bootstrap user details form embedded with asp.net mvc validation

Simple bootstrap based html form to quickly create form for data input along with field level validation supported by asp.net mvc validation and bootstrap css classes to flag errors. bootstrap forms, asp.net mvc validation

Common ASP.Net Web Virtual and Relative Url helper classes

List of ASP.Net Web/MVC Virtual Paths,Relative and Absolute Paths Utility helper classes Property Input Url Return Value HttpRequest.ApplicationPath http://localhost/testapp/home.aspx /testapp HttpRequest.CurrentExecutionFilePath http://localhost/testapp/home.aspx /testapp/home.aspx HttpRequest.FilePath http://localhost/testapp/home.aspx /testapp/home.aspx HttpRequest.AppRelativeCurrentExecutionFilePath http://localhost/testapp/home.aspx ~/testapp/home.aspx HttpRequest.Path http://localhost/testapp/home.aspx /testapp/home.aspx/PathInfo HttpRequest.PhysicalApplicationPath http://localhost/testapp/home.aspx C:inetpubwwwrootTestApp HttpRequest.RawUrl http://localhost/testapp/home.aspx?user=1 /testapp/home.aspx?user=1 UrlHelper.Content ~/testapp/home.aspx c:inetpubwwwroottestapphome.aspx Property Input Url Return Value HttpContext.Current.Request.Url.Host http://localhost:8080/testapp/home.aspx?user=1&new=2 localhost HttpContext.Current.Request.Url.Authority http://localhost:8080/testapp/home.aspx?user=1&new=2 localhost:8080 HttpContext.Current.Request.Url.AbsolutePath http://localhost:8080/testapp/home.aspx?user=1&new=2 /testapp/home.aspx… Read More »