Tag Archives: code

Access and update Qualtrics embedded data from javascript

On multiple occasions when designing surveys in Qualtrics, I’ve run across situations where I need to both access embedded data from javascript and update the embedded data. Unfortunately, it is not immediately obvious how to do this, and it takes … Continue reading

Posted in it | Tagged , , , | Leave a comment

Javascript disable hidden .net validators

A quick javascript function to disable hidden .net validators involves iterating through all validators in the page, and enabling/disabling them based on whether or not they are visible. This snippet has come in handy for me many times. Define the … Continue reading

Posted in it | Tagged , | Leave a comment

BNS error. The maximum number of ScheduledActions of this type have already been added.

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

Posted in it | Tagged , , , | Leave a comment

Access referring page in asp.net

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

Posted in it | Tagged , , | Leave a comment

JQuery click event fires multiple times

A quick gotcha–sometimes your click events might fire multiple times. Just double check your event handlers are inside document.ready().

In large javascript files, sometimes it’s hard to catch!

Posted in it | Tagged , | Leave a comment

LINQ to Entities does not recognize method

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

Posted in it | Tagged , , | Leave a comment

Sitecore iframe validation

According to the XHTML 1.1 specifications, iframes are deprecated and should be replaced by object tags. Sitecore validation correctly fails on any pages with iframes. Unfortunately, there are some edge cases where object tags do not always work (IE8, I’m … Continue reading

Posted in it | Tagged , | Leave a comment

SQL script to populate a state lookup table

I needed to populate a Microsoft SQL table with state lookup data, but was unable to find any scripts out there that I could copy and paste. Here’s what I ended up putting together. There’s nothing groundbreaking about this code … Continue reading

Posted in it | Tagged , | Leave a comment

Check Sitecore item presentation

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

Posted in it | Tagged , , , | Leave a comment

Access parent DataItem in nested repeater

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

Posted in it | Tagged , , | Leave a comment