Archive for category ASP.NET

The sometimes overlooked Enumerable.Range

I’ll start with confessing that the first time I saw LINQ and especially Enumerable.Range I didn’t see what I would use it for. Well, luckily times change… An example The other day when I was writing some code for a mockup and I hade to generate some fake data. More than often, that sort of […]


Leave a comment

Revised:Cascadingdropdown causes invalid postback or callback argument error

A while back I wrote a post about how to solve the error message you can get from using the Cascading Dropdown Extender from the Ajax Control Toolkit which is: “Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation=”true”/> in configuration or <%@ Page EnableEventValidation=”true” %> in a page. For security purposes, […]



Building a little menu with a some JSON, LINQ and the JQuery Template Plugin

This is a little tutorial I thought I´d write about a little problem I recently solved with a couple of different technologies that worked very well together. Background From a customer I got a request to build some sort of navigation (or menu) for some items, let´s for the sake of this little tutorial pretend […]

, , ,

Leave a comment

Using extension methods as binding expressions

I recently ran into an issue with an ListView where I wanted to “bind” to an extension method on the entity I was working with. So, my object looked something like this: I deliberately put the extension method in a different namespace (since that is usually the case). And the list view item template […]

, , ,


Using jQuery to trigger click event on linkbutton

I ran into a little problem with jQuery today which I thought I´d share with you. I had an list view with an item template and an edit template. Source code can be downloaded from my github repo. What I wanted to accomplish was to be able to use either the edit button or […]


Using a generic ascx control to display messages to the user

I have many times been involved in projects where the customer wants the application (web/SharePoint) to inform the user when something is successfully completed or for that matter when the app fails. Since I usually implement things using ascx controls (usercontrols) this has in most cases been implemented using a method on the masterpage/page that […]

, , , ,


CascadingDropDown causes invalid postback or callback argument error

Update 2011-04-09 I have created a new post that included an example application here. Have a look at this markup: In this page I have three dropdown lists with the CascadingDropDown extender attached to them, not going to go into details how I set them up (maybe some other time) though. The issue was in […]

, ,


Adding assemblies and namespaces to web.config to avoid duplication of code

In many (like all of them) items in SharePoint (aspx/ascx/master) I work with you keep repeating the same sort of code in the page directive. Adding the ability to work with controls from the Microsoft.SharePoint.WebControls and Microsoft.SharePoint.Publishing.WebControls namespaces. This code is “duplicated” in all these items and I don´t like repeating myself so wouldn´t it […]

Leave a comment

Lazy loading ascx UserControl (or something else) at loadtime

I wanted to make an ascx usercontrol “lazy” load when it´s loading on aspx page. So I´m really using the ascx as a view (if you know about MVC you´ll get that) that only acts when it receives data. So the thing I was after was something like… The user makes a choice of a customer from […]

, , ,

1 Comment

How to force Visual Studio to generate (or regenerate) your .designer file

I got stuck on a problem (related to the title of this post) today and thought I´d share my experiences (and how I solved it). I had a class library project that I wanted to change into a web application project and copy some stuff from an old web application project that I had. That […]

, ,