extension method public static class EnumSelectList { public static IEnumerable GetList(this T thing) where T : IEnumerable { var result = from i in thing select new SelectListItem { Text = i.Value }; return result; } } new method on the type public static IEnumerable GetAll() { var list = ( from i in _instances select i.Value) .Cast(); return list;… Read more →
Category: unpublished
How to log-in to your WordPress site
yoursite\wp-admin Read more →
Connecting to Data in Telerik Reporting with the ObjectDataSource Component
Connecting to Data in Telerik Reporting with the ObjectDataSource Component Read more →
http://www.piotrwalat.net/consuming-asp-net-web-api-services-in-a-windows-8-c-xaml-app/ Read more →
MVC
simple ajax controller (for countries etc) ajax (these are research notes) consuming WebApi with MVC consuming WebApi with MVC Dynamic content in MVC/Razor the following contains xml entries to get past razor runtime compilation errors of namespace not found: @Html.LabelFor(model => model.path.Value, “Path”) @Html.DropDownList(“Path”, new List { new SelectListItem { Text = TypeSafeEnum.a.Value, Value = TypeSafeEnum.a.Value }, new SelectListItem {… Read more →