ASP.NET Enumerate Query String Values
Although it is fairly easily to get a single query string value, I recently found it was very difficult to get the entire querystring which I wanted to include in an error report. In order to store the querystring in a variable you need to create a NameValueCollection from the System.Collections.Specialized namespace:
<%@ Import Namespace="System.Collections.Specialized"%>
Dim param As NameValueCollectionparam = Request.QueryString
Then you will need two For loops (i.e. nested loops) to get the collection’s keys and values:
Dim i, j As Integer
Dim arr1() As String = param.AllKeys
For i = 0 To arr1.Length - 1
Dim arr2() As String = param.GetValues(arr1(i))
For j = 0 To arr2.Length - 1
strQueryStringValue = strQueryStringValue & arr1(i) & “=” & arr2(j) & “&”
Next
Next
This problem came up because I was trying to troubleshoot some code which I did not write. The previous developer gave a form the GET method and was passing a memo field in the querystring. This is bad programming because the querystring is not meant for lengthy amounts of text. There is a limit to the allowable length of a querystring. Many firewalls will truncate a querystring because lengthy querystrings are used to cause buffer overflows in web servers and browsers. Therefore I wanted to get the length of the entire querystring for my error report.
Recording Studio
I don’t like how my voice sounds when recorded with a PC microphone so I ordered over $500 of audio equipment. I bought a PreSonus Firebox 6x10 FireWire Recording Interface, a Shure SM58 Dynamic Handheld Microphone, a Sony MDR7506 Large Diaphragm Foldable Headphones, and a CBI HiZ Microphone Cable.

Unfortunately my computer does not have any firewire ports so I cannot try it out yet. I thought my computer had firewire ports but they turned out to be USB ports. So I had to order a 3 Plus 1 Port Firewire PCI Card which has not arrived yet. If my recording studio allows me to record the natural sound of my voice I will be able to narrate my screen capture videos.
Yesterday I visited the
Smithsonian Natural History Museum rather than hang around the National Book Festival. The 2006 National Book Festival was pretty boring. You could only buy books by the featured authors, stand in a long line to have your books autographed, or watch authors read in various tents. I bought
Thank You For Not Smoking by Christopher Buckley and
Stone Bow Prayer by Amy Uyematsu although I’m not very interested in reading either book.
There was a light drizzle so I decided to visit the nearby Smithsonian Natural History Museum instead. It was really amazing! On the first floor I saw lots of dinosaur skeletons; including a Tyrannosaurus Rex and a Triceratops. They also have mammal fossils. The most impressive mammal fossil was a giant sloth that was as huge as a dinosaur. I also saw a woolly mammoth skeleton fossil.
The first floor also has a mammals exhibit were I saw stuffed animals; tigers, lion, monkeys, gorilla, bear, bats, kangaroos, zebras, etc. There was also a special exhibit of the Sikhs from the Punjab region of India. I liked this exhibit because I’ve never heard of the Sikhs so their culture appeared quite exotic. There was a model of the Harimandir Sahib, a golden temple, and images of their ten gurus.
The second floor has the gems and minerals exhibits, the bones exhibit, insect zoo, and meteorites exhibit. I saw the Hope diamond which had a crowd around its glass case. The gems and minerals was a spectacular collection of crystals in many different shapes and colors. I saw some moon rocks and meteorites. The bones exhibit had skeletons of many animals including very large sea turtles. I saw a live tarantula in the insect zoo.
At the museum store I bought two books;
Tyrannosaurus Sue by Steve Fiffer and
Vanished Kingdoms: The Wulsin Photographs of Tibet, China and Mongolia 1921 - 1925 .
The Smithsonian Natural History Museum made me feel some existential angst because it presents you with the physical evidence for the vastness of time and space. The animal skeletons and dinosaur fossils seem a grim reminder of how short any lifeform’s existence is compared to the time required for crystals to form and grow or meteorites to travel through space.
The bus trip was arranged by the James V Brown Library with a focus on the 2006 National Book Festival. The bus stopped at a Cracker Barrel restaurant for diner and I was forced to watch the Whoopi Goldberg movie
Sister Act on the bus.