Category Archives: .net

Sitecore contact facets – Create your own facet

This article describes how to create a simple Sitecore facet consisting of a DateTime and a list of strings. A contact is made up of facets. Here are all the facets Sitecore uses (you will find the facets in \App_Config\Include\Sitecore.Analytics.Model.Config): In … Continue reading

Posted in .net, c#, General .NET, Sitecore 8 | Tagged , , , , , , , , | 13 Comments

URL Rewrite and Sitecore

The Microsoft URL Rewrite module is an ISS extension that allows you to rewrite one URL to another using regular expressions. The extension is like the Sitecore aliases on steroids, and is especially useful for mapping old dynamic URL’s to … Continue reading

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

Sitecore 7 create item and update index at the same time

With Sitecore 7, the Sitecore index (based on Lucene.NET) have greatly improved, thus making the index even more usable. One thing you should know though, is that when you add items to Sitecore using the Sitecore.Data.Items.Item.Add() method, the index is … Continue reading

Posted in .net, c#, Sitecore 7 | Tagged , , , , | 5 Comments

Stream Sitecore media items to HttpResponse

Here is a small tip for you who is doing API’s based on Sitecore. How to get an item from the Sitecore Media Library and stream it to the HttpResponse of a page. This is an example of an .ashx … Continue reading

Posted in .net, c#, Sitecore 7 | Tagged , , , | Leave a comment

Register local search terms in Sitecore DMS

When installing Sitecore and DMS, Sitecore comes pre-installed with an Executive Insight Dashboard Report that will generate a report containing which search words users have executed in your local search page. All you need to do is to register a … Continue reading

Posted in .net, c#, Sitecore 6, Sitecore 7 | Tagged , , , , | 1 Comment

JavaScript ReferenceError: Can’t find variable: __doPostBack

This error can occur in asp.net pages. In certain situations .net will fail to create the __doPostBack JavaScript function and the hidden __EVENTVALIDATION input field. The situations that can cause this are: When using asp:ImageButton or asp:LinkButton controls AND: When viewing … Continue reading

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

Merge Sitecore layout details using XmlDeltas

One of the features that Sitecore introduced somewhere in the Sitecore 6.x range is “Layout Deltas“,  the possibility to merge an item’s layout details with the layout details on the item’s __Standard Values template. It means that you can add sublayouts to the __Standard … Continue reading

Posted in .net, c#, Sitecore 6, Sitecore 7 | Tagged , , , | 2 Comments

Custom rules and conditions for Sitecore personalization

In Sitecore it is possible to change the sublayouts or data sources on a page depending on conditions. This means that users can see the same page differently, depending on a set of rules. Sitecore comes standard with a set of standard … Continue reading

Posted in .net, c#, Sitecore 6, Sitecore 7 | Tagged , , , , | 4 Comments

(System.Web.UI.HtmlControls.HtmlIframe) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl)

Yesterday I got the following error: Parser Error Message: The base class includes the field ‘IFrame’, but its type (System.Web.UI.HtmlControls.HtmlIframe) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl). Source Error: Line 14: <iframe id=”IFrame” frameborder=”0″  runat=”server” visible=”false”/> Reason: The code … Continue reading

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

A potentially dangerous Request.QueryString value was detected from the client

One of my colleagues encountered this error in Sitecore 6.6: A potentially dangerous Request.QueryString value was detected from the client You might think that this error was caused by the Microsoft AntiCSRF implementation by Sitecore.  But it is not, it’s … Continue reading

Posted in .net, General .NET, Sitecore 6, Sitecore 7 | 1 Comment