Tuesday, June 20, 2006

I know this probably seems quite intuitive, and now that i've discovered the solution it is, but I still thought it worthy of blogging.

When configuring CruisControl.net <webURL> node in ccnet.config, html encode the string value.  After all, its in an xml config document.  I was trying to url encode it, which didn't work, or include it raw, which violates xml rules.

The correct config setting looks something like this:

<webURL>ttp://buildbox.corp.mycompany.com/ccnet/default.aspx?_action_ViewProjectReport=true&amp;server=BuildBox&amp;project=MyCompany.Project1</webURL>

The exceptiont that is raised in the cctray is bizarre.  At the moment, I can't even get it to blow up for me and I'm over messing with ccnet.config today.

happy building

6/20/2006 2:42:01 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Friday, June 09, 2006
Its been a long while since I've blogged code.

I have dynamic images (photos to be precise) coming in.  They can be various sizes.  I have a limited width area on my web page in which to display the photo.  I don't want to stretch the small images but I don't want large images to mess up my layout.  I require a clientside solution for maximum image <img> width without affecting thos images that aren't violating the threshold.

                <script>
                function maxImage(img, width){
                     //copy to new image so it will work in ie
                    var newImg = new Image();
                    newImg.src = img.src;
                    var iWidth = newImg.width;
                    var iHeight = newImg.height;
                    if( iWidth > width ){
                        var iRatio =  iWidth / width;
                        img.width = width;
                        img.height = iHeight / iRatio;
                    }
                }
                </script>

                <img border="0" src='<%# Eval("SomeDynamicImageUrl") %>' onload="maxImage(this,250);"/>

For years I have said, "can't be done."  Reinforces my philosophy: never say never

6/9/2006 7:28:54 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback

Theme design by Jelle Druyts

Pick a theme: