-
Visual Studio project not showing in Manage NuGet Packages for solution select project window
I wanted to include an old SiteMap project of mine in a new Visual Studio solution for a project I am working on, but ran into a bit of trouble wanting to add NuGet packages to it. I was able to install packages on the solution’s projects, and on the SiteMap project separately, but not…
-
How to get URL to FuBuMVC input model endpoint in a view
I wrote a small extension method for retrieving the URL to an input model endpoint in FuBuMVC together with my collegue Christer Bermar today. What we wanted to achieve was to have the relative address without the leading slash added to a custom attribute placed on a span tag. Note: If you don’t enjoy reinventing…
-
How to make EPiServer surveil your config files notifying you on change
I have been a little bit dry on coding inspiration lately, until the other day when my collegue Karl Ahlin gave me an interesting idea concerning monitoring of configuration files. While I enjoyed coding it, I will leave it unsaid if and where it could actually create value. There may still be a few what…
-
Being friends with the PropertyControlClassFactory, or: 101 ways to change EPiServer built-in property appearances
As I have been playing around with using ControlAdapters to change the rendering of built-in EPiServer properties lately, I got curious on what else I could possible do to modify them. As it turns out, the EPiServer PropertyControlClassFactory is a great ally in doing this. Hence, this post mostly revolves around different ways of getting…
-
Complete and concrete example of what an ASP.NET WebForms Model-View-Presenter project may look like using StructureMap, NUnit and AutoMoq
For quite some time now I have been thinking of creating some sort of sample project to show how a Model-View-Presenter approach may be used in an ASP.NET WebForms project. Lots of what is out there on this subject seem to be rather fluffy in nature, bits and pieces, not really giving you everything that…
-
Internet Explorer loses Referrer when redirecting or linking with JavaScript
I came across another Internet Explorer feature today as I was debugging a piece of code related to adding referrer URLs when submitting input forms. It worked perfectly on all versions that I tried of Firefox and Chrome, the referring URL was there, but when it came to IE it just would not give me…
-
Supplying EPiServer scheduled jobs with parameters through Admin Mode
I have always missed a way of supplying arbitrary input parameters to EPiServer scheduled jobs through the Admin Mode scheduled job interface. As Stefan Forsberg laughingly pointed out to me when I told him about my POC for this functionality (something in the lines of “Oh, I see you have found yourself a hammer.”), I…
-
Allowing web editors to apply PageType based filtering on the EPiServer edit mode PageTree
When you have an EPiServer installation containing thousands of different pages built up by far-too-many page types, locating pages of just one of them may turn out to be just a little too time consuming. Since I have grown to like the adaptive control approach more and more lately, I decided to create a filtering…
-
Recursively finding an ASP.NET control with a specific ID
I wrote a short recursive method for locating specific controls while having no idea of where they are in a nested structure; actually, I added one dynamically and needed to find it again. This will return the first control matching the ID below the supplied root control, if it can find one of course. FindControlRecursively…
-
Surviving IE, or: How to render different markup depending on devices and browsers
The short answer would be, “Create a control adapter, add it to your .browser file and have it applied using browser recognition”. If you want the longer verion, you will have to continue reading. First, let us start with some basics on control adapters. I find them extremely useful tweeking built-in EPiServer (the CMS that…
-
Keeping your hair from turning gray, or: How to style the asp:FileUpload control using control adapters
The other day, I got a question from a former collegue of mine who was having trouble styling the ASP.NET FileUpload control, as it renders into a particulary nasty bit of HTML; i.e. an <input type=”file” /> tag. He told me that he would love for it to be just another textbox along with a…
-
The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine exception
I got this exception when setting up an old website on a new 64-bit Windows Server. The system was using an old Access database for keeping statistics information, which did not seem to like the new environment. As I did not have Microsoft Office installed on the server I had to download the 2007 Office…
-
Simple handling of legacy URLs to an EPiServer 4 site migrated to a later version
When a customer wants to move their site from version 4 of the EPiServer platform to a later one, the URLs will change. It is very likely that so will the ids for the migrated pages. Here is a simple method for retaining functioning bookmarks, unbroken links from other websites, keeping RSS readers happy, while…
-
Removing empty fields from EPiServer XForm e-mails
A customer asked me to see what I could do for their XForm order notification e-mails today. Apparently the department handling their incoming orders was receiving really long e-mails with loads of superfluous information; this as every field in the XForm was being submitted to them, and not just the ones containing data. This is…
-
Finding all controls of a specific type on a page
I was working with dynamically added TextBox controls in an unknown structure of recursively nested Repeaters the other day, and needed to loop through them after they were posted back to the server. Since I had no idea of where they were located, how many they were nor their IDs, I solved it in the…