ASP.Net Archive
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 by clicking on the solution itself selecting the manage NuGet …
Mathias Kunto
September 19, 2012
FuBuMVC
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 wheels, please have a look at Josh’s comment below and …
Ran into a little difficulty with a FuBuMVC website today while trying to have InputFor generate a radio button list. The problem was that we were using an enum (as the one below) to represent the values, which passed through InputFor turns into an input field of type text. I wrote a small Attribute in order to take care of it with a custom FuBu …
While searching for a pretty looking image slide show plugin that would not need me to have a Flash player installed on the client computer, or on the client iPad for that matter, I stumbled across an interesting piece of jQuery; the Nivo Slider from Dev7studios. While there are plenty of WordPress plugins using the Nivo Slider (none of the ones I tried actually working …
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 ifs with the approach, and some of it may be …
Some time ago I developed a small plug-in to EPiServer‘s edit mode page tree, allowing web editors to filter its pages based on all available page types. I decided to spend this weekend in the sun on my balcony with my laptop extending the functionality a great deal. The code is as usual available over at GitHub, and also as a NuGet package in the …
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 it to do what you want. The example source code …
Recently I got slapped back into reality receiving a Twitter message from my collegue Patrik Akselsson in which he kindly asked me to hand him a GitHub link to the code from one of my blog posts. Being long overdue uploading my code into a public repository and constructing NuGet packages for my EPiServer features, I decided to do so for all my relevant posts. …
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 you need; especially if you have not worked with a …
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 the address. As the failing incoming link was being syndicated …
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 seem to have found a way of using control adapters …
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 mechanism for cleaning out dead ends in the EPiServer page …
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 method Usage As Page is also a Control it may …
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 I most often find myself working with) controls; especially adding …
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 stupid button. If you have ever tried applying any type …
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 System Driver: Data Connectivity Components from the Microsoft website. After …
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 at the same time feeding search engines 301 – Permanently …
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 the default behaviour of the XForm functionality, which of course …
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 simplest way that I could think of; by creating a …