вторник, 26 января 2010 г.
Идея: .NET IL box/unbox counter
На вход утилита должна принимать .NET библиотеку или исполняемый файл. Декомпилировать его в IL код, и выявлять и подсчитывать количество циклов с вложенными упаковками/распаковками.
пятница, 15 января 2010 г.
.NET P2P
- Microsoft Peer-to-Peer Networking Blog
- Peer-to-Peer Networking MSDN Forum
- Lance Olson - .NET P2P: Writing Peer-to-Peer Networked Apps with the Microsoft .NET Framework
- Justin Smith - Harness The Power Of P2P Communication In Windows Vista And WCF
- Kevin Hoffman How To Design State Sharing In A Peer Network [RU]
- Peer-to-Peer Programming with WCF and .NET Framework 3.5
четверг, 14 января 2010 г.
jQuery v1.4
воскресенье, 13 сентября 2009 г.
С Днем Программиста!
Успехов ;-)
четверг, 10 сентября 2009 г.
ASP.NET MVC: jQuery Grid Plugin
Показал как прикрутить и отобразить данные с помощью плагина jqGrid, в дальнейшем планирую рассмотреть сценарии CRUD и различные типы входящих данных.
воскресенье, 30 августа 2009 г.
ASP.NET MVC: ActionLink with Image
Попытки передать вместо текста ссылки готовый тег '<img src='Icons/edit.png'/>' ни к чему хорошему не привели, потому как оно выводится через метод HttpUtility.HtmlEncode, который заменяет в тексте знаки '<' '>' на '<' и '>' соответственно.
Сделал с помощью Extension methods (методы-расширения) для класса HtmlHelper.
public static class Extensions
{
public static string ActionLinkImage(this HtmlHelper htmlHelper, string altImageText, string imagePath, string actionName)
{
return ActionLinkImage(htmlHelper, altImageText, imagePath, actionName, new RouteValueDictionary(), new RouteValueDictionary());
}
public static string ActionLinkImage(this HtmlHelper htmlHelper, string altImageText, string imagePath, string actionName, object routeValues)
{
return ActionLinkImage(htmlHelper, altImageText, imagePath, actionName, new RouteValueDictionary(routeValues), new RouteValueDictionary());
}
public static string ActionLinkImage(this HtmlHelper htmlHelper, string altImageText, string imagePath, string actionName, object routeValues, object htmlAttributes)
{
return ActionLinkImage(htmlHelper, altImageText, imagePath, actionName, new RouteValueDictionary(routeValues), new RouteValueDictionary(htmlAttributes));
}
public static string ActionLinkImage(this HtmlHelper htmlHelper, string altImageText, string imagePath, string actionName, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes)
{
const string linkTextReplacement = "F14E9A0EB8C4";
string actionLink = System.Web.Mvc.Html.LinkExtensions.ActionLink(htmlHelper, linkTextReplacement, actionName, routeValues,htmlAttributes);
return actionLink.Replace(linkTextReplacement, String.Format(@"<img src='{0}' alt='{1}'/>", imagePath, altImageText));
}
}
А применяется оно так:
'<%= Html.ActionLinkImage("Edit", "Icons/edit.png", "Edit", new { id = item.EmployeeId }, new {@class = "ImageLink"})%'>
Результат:
'<A class=ImageLink href="about:/Employee/Edit/100"><IMG alt=Edit src="about:Icons/edit.png">'</A>