Monthly Archives: March 2009

How to resample images – a simple algorithm

When working with images I sooner or later usually run into the problem of creating thumbnails. Resampling images is not really difficult in the major programming languages however I have not found built-in support for caclulating thumbnail dimensions neither in .NET nor in PHP. And it seems that this made me re-invent the wheel over and over again creating codes with various lengths just for this simple task.

In Sense/Net 6.0, the open source ECMS I am working on I came across the exact same problem: I wanted to resize images, this time on the fly. This time however I decided to do it a bit less complicated as in previous cases and create a clean and simple solution. After a good deal of googling, tutorial reading and planning I came up with a fairly simple and good code snipplet.

Read More…

ASP.NET server side element names changed?

As far as I’ve known if the ClientID of a server control looked someting like this:

ctl00_WebPartManager1_184c801b_7c67_4967_be37_3ab10406f967_ctl00_linkVote1
.

Then the name sent on postback (which identified the control on the server side) was:

ctl00$WebPartManager1$184c801b$7c67$4967$be37$3ab10406f967$ctl00$linkVote1
.

But since some time the _ to $ conversion is not true any more. Instead the _ signs are randomly replaced by dollar signs. Recently the name sent back on postback is:

ctl00$WebPartManager1$184c801b_7c67_4967_be37_3ab10406f967$ctl00$linkVote1
.

This change screwed up quite a lot of client side manual __doPostback() codes I’ve written – most of the making these invokes due to JQuery addons.
Read More…

 Scroll to top