Archive for posts dated 'June 2008'
-
June 2008
-
Making Request.QueryString writable (by clone/copy)
Every now and then I completely forget that the Request.QueryString (and Request.Form) object is read-only. Today I had a bit of functionality where I needed to remove a key/value from the collection - but the Remove() method (of the NameValueCollection object) throws an exception. Unfortunately, the Request.QueryString's CopyTo method assigns the values to an ARRAY, not a NameValueCollection - losing functionality and flexibility. You need to copy the Request.QueryString object to a new NameValueCollection instance,…
-
How to convert NameValueCollection to a (Query) String
Most ASP.NET developers know that you can get a key/value pair string from the Request.QueryString object (via the .ToString() method). However that functionality isn't the same for a generic NameValueCollection object (of which Request.QueryString is derived from). So how do you take a NameValueCollection object and get a nicely formatted key/value pair string? (i.e. "key1=value1&key2=value2") ... Here's a method I wrote a while ago: /// <summary> /// Constructs a QueryString (string). /// Consider this method…
-
How to best embed a WMV video clip?
I hate to admit it, but I’m stuck… I’m trying to figure out how to best embed a WMV video clip in a web-page, so that it works cross-browser (and cross-platform). Even after all my years of web-development, I’m still confused to which browser supports which tag … nested <embed> tags in <object> tags … it gets messy! I’m as equally confused with the Class ID attribute: “CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6” – surely that can’t be the same…
-
Firefox 3 – Download Day
Today is Firefox 3 Download Day! Mozilla are hoping to set a Guinness World Record for most software downloads in 24 hours. At the time of writing, over 1.2 million people have pledged to download Firefox 3 on the Download Day! This is a first attempt of this record, so there is no number to beat. But Mozilla want to outdo the number of Firefox 2 downloads on its launch day, which was 1.6 million!…
-