
Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
Archive
Meta
Category Archives: .net
Sitecore Links with LinkManager and MediaManager
This article describes how Sitecore handles internal and external links, how you can resolve the correct URL to an item, and what you should know about links when building multisite and multilanguage websites. To render a corrent URL you use … Continue reading
Posted in Sitecore 6, .net, c#
Tagged LinkManager, LinkProvider, MediaManager, Sitecore, SiteResolving
1 Comment
Validate CheckBoxList using a CustomValidator
In this article I explain how you can validate that at least one checkbox is checked in an asp:CheckBoxList using an asp:CustomValidator, and how to make it work server side and client side. None of the built in .net validators … Continue reading
Posted in .net, c#, General .NET
Tagged .NET, CheckBoxList, ClientValidationFunction, ControlToValidate, CustomValidator, isvalid, Javascript, server side validation, validation
3 Comments
An existing connection was forcibly closed by the remote host
This error occured randomly in my project when I tried to read images from a HttpWebRequest. The exception is: Exception: System.IO.IOException Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. Nested … Continue reading
Custom 404 page ignored by IIS 7
If your IIS does not display your own custom error page, this might be the problem – and the solution: I recently had to implement a custom 404 error page. The code for that is pretty simple. In the web.config, … Continue reading
Javascript string encoding in C#
In a previous post I explained how you can use the C# System.Uri.EscapeDataString() to encode strings to be later decoded by the equvivalent JavaScript decodeURIComponent(). The method above is still valid when encoding HTML tags, but fails short when encoding … Continue reading
Posted in .net, c#, General .NET
Tagged decodeURIComponent, encoding, EscapeDataString, Javascript
2 Comments
Reading mails using IMAP and MailSystem.NET
In this article I will describe how you can use C# and MailSystem.NET to read mails from any IMAP source, including GMail. MailSystem.NET is a Open Source, GNU Library General Public Licensed library for managing emails using SMTP, POP3, IMAP … Continue reading
XElement get default values using extension methods
I often work with dynamic XML documents which might or might not contain the element, field or attribute that I am looking for. The Standard .NET XElement class is pretty strict (as it should be) and returns a null reference … Continue reading
Posted in .net, c#, General .NET
Tagged Default values, Extension Methods, XElement, XML, XmlElement
1 Comment
Using Sitecore EditFrame in PageEdit
The sc:EditFrame is a Sitecore Page Editor (called Content Editing in Sitecore marketing terminology) feature that allows front end access to fields that are not directly accessible, either because they are not visible or they are of a type that … Continue reading
Posted in General .NET, Sitecore 6, .net, c#
Tagged Sitecore, EditFrame, Page Edit, TreeList, IsPageEditor, Content Editing
7 Comments
Parse namevalue collection with quotation marks handling
Parsing of namevalue collections is a common pattern. .NET have build in parsing of Query Strings, and other bloggers have solutions on how to do this. This is Yet Another NameValueCollection parser. It will parse not only query strings, but also … Continue reading
Posted in .net, c#, General .NET
Tagged Collection, Dictionary, NameValue, Parse, Quotation marks, Quotes, Split
Leave a comment