Tag Archives: c#

C# Mask email address for GDPR reasons

UPDATE 2018-08-10: See this post SHA256 hashing email addresses for GDPR reasons for an even better masking approcah. Thanks to Inspector Cluedget for the tip. This is a C# extension method that will mask your email address following this pattern: If it’s … Continue reading

Posted in .net, c#, General .NET | Tagged , , , | 3 Comments

Creating dynamic arrays and lists using Dynamic and ExpandoObject in C#

In this previous post, C# Using Newtonsoft and dynamic ExpandoObject to convert one Json to another, I described how you can use the dynamic keyword and the ExpandoObject class to quickly transform JSON without the need for any concrete implementations of … Continue reading

Posted in .net, c#, General .NET | Tagged , , , | Leave a comment

Add text to asp:ValidationSummary (C#)

This trick is especially useful when you have custom code to be executed after your form have been submitted, and still wishes to communicate an error the same way as you communicate form validation errors. Imagine the following ValidationSummary: Any … Continue reading

Posted in c#, General .NET | Tagged , , , | 1 Comment

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

Posted in .net, c# | Tagged , , , , , | 75 Comments

Creating a tree like left menu in Sitecore using UserControls and C#

This post is a follow-up on the article on how to create a tree like left menu in Sitecore using XSLT. This time I will not use XSLT to create my left menu, but instead I will use C# and … Continue reading

Posted in c#, Sitecore 6 | Tagged , , , , , , , , , , | 5 Comments

Using modal windows from C# code

“In user interface design, a modal window is a child window that requires the user to interact with it before they can return to operating the parent application, thus preventing the workflow on the application main window. Modal windows are … Continue reading

Posted in .net, c#, General .NET | Tagged , , , , | 2 Comments