A John of all trades, but mainly in body, mind, and IT.
Tag Archives: c#
My first Windows Phone 8 app was approved and published to the Windows Store last week. It’s a simple live tile that takes advantage of background tasks and the location api. It’s available for download here.
In setting up a PeriodicTask in my Windows Phone 8 project, I ran into an error while debbugging: BNS error. The maximum number of ScheduledActions of this type have already been added. This occurs when there is already a PeriodicTask … Continue reading
In an asp.net web application, the referring page can be accessed via the Request object. This is useful for controls that redirect to the previous page. To access the local path and store it to ViewState, use:
It’s also … Continue reading
I run into this NotSupportedException more often than I should: “LINQ to Entities does not recognize the method ‘System.String ToString()’ method, and this method cannot be translated into a store expression.” It’s a simple fix, but it always slips my … Continue reading
There are many times when I’ve had to implement business logic that depended on whether or not Sitecore items had presentation details set. For example, in a site-wide page search, it wouldn’t make much sense to return links to items … Continue reading
Every once in a while a presentation comes along that requires multiple nested repeaters. The majority of times I’ve encountered this, there is something special that needs to be done to the last item in the inner repeater. With one … Continue reading
I’ve run into multiple situations where I’ve wanted to reuse most of a Sitecore sublayout/control with only one or two differences in the control’s properties. For example, this has happened when I have chunks of markup that are entirely identical … Continue reading
I spent hours trying to figure out how to set the class attribute of images rendered with the Sitecore FieldRenderer. Unfortunately, the CssClass attribute does not work on the FieldRenderer control as it does on the Image WebControl. Long after … Continue reading
To access the currently selected DateTime in the content editor’s preview mode, instead of checking the query string, use
Also, be sure to check if the page is in preview mode first. In my case, I had a presentation … Continue reading
I stumbled upon some puzzling code the other day. It makes me wonder, what sort of direction is your code going if this is what you end up with? Unnecessary code omitted (unlike the snippet) to increase clarity.