September 2004 - Posts

Fun with Reflection

I was working with an application that stored some permission information in an integer in the database. Each bit of the integer represented a particular permission. The meaning of each bit came from an enumeration defined in a VB6 DLL. I needed to dig into some of these existing permission values to find out which permissions were enabled based on which bits were set in the database.

I was originally going to write up a quick VB6 app that referenced the DLL with the enumeration. I could then do a bitwise AND for each member of the enum to see if the bit was set. I thought "This would be way easier in .NET using reflection and Enum.GetValues"...

Since I usually listen to the voices in my head, I quickly created an RCW with TLBIMP and wrote up a quick app that used Enum.GetValues and Enum.GetNames to loop through the enum and display a list of permissions for me. Way easier than manually coding it with VB6 -- or digging into the Type Library API's to do the same thing in COM.

Posted by PSteele | 2 comment(s)

How to Seamlessly Deploy ASP.NET Applications with Wise for Windows Installer

Local Regional Directory Bill Wagner (co-founder of SRT Solutions) will be hosting a "webinar" on using Wise for Windows Installer for installing and configuring data-drive web applications. The webinar is free and takes place tomorrow morning at 8:30 AM EST. For registration information, go to http://www.wise.com/wfwi_webcasts.asp.
Posted by PSteele | 2 comment(s)

Having some fun...

<GeekMessage>

byte[] message = new byte[]
	{71, 77, 97, 105, 108, 32, 73, 110, 118, 105, 116,
	101, 115, 32, 65, 118, 97, 105, 108, 97, 98, 108, 101};

byte[] contact = new byte[]
	{69, 109, 97, 105, 108, 32, 102, 105, 114, 115, 116, 32, 38, 32, 
	108, 97, 115, 116, 32, 110, 97, 109, 101, 32, 116, 111, 32, 112, 
	97, 116, 114, 105, 99, 107, 64, 109, 118, 112, 115, 46, 111, 114, 103};

Console.WriteLine(Encoding.ASCII.GetString(message));
Console.WriteLine(Encoding.ASCII.GetString(contact));

</GeekMessage>

Posted by PSteele | 3 comment(s)

Get The Dirt on Disposing

Chris Lyon had a great post on "Demystifying Dispose" that anyone doing .NET development should read (and I assume all three of my readers are doing .NET developemnt!).
Posted by PSteele | with no comments

Tools for content, KM, blogs, and RSS

I'm cleaning out my "Items For Follow Up" folder in RSS Bandit and realized I forgot to blog this when it was announced. Bill Wagner (local Microsoft Regional Director and co-founder of SRT Solutions here in Michigan) asked me to participate in an interactive session to discuss corporate content and how to manage and use it: newsletters, press releases, blogs, wikis, etc... I'll be joined by some heavy hitters: Bill French, co-founder of MyST Technology Partners and Catherine Hayes, Managing Parter at Inner Circle Media.

Details can be found here.

Posted by PSteele | with no comments

The Big 'O'

Darren Neimke writes about a blog entry he found dealing with "OO True Believers" and how some developers become so obsessed with object oritented'ness that it clouds their vision.

It reminded me of another term a guy I used to work with coined. Their was such an over-use of XML he said someone had an "XML orgasm all over the code". I still chuckle whenever I remember that story... :)

Posted by PSteele | 1 comment(s)

.NET To Go comes to Detroit

The .NET To Go Mobility Roadshow is coming to Detroit! Wednesday, October 20th from 5:15pm - 9:00pm at the Microsoft offices in Southfield, Michigan. Even though they've got some decent sized conference rooms, make sure you get a spot by registering today.

Besides getting three hours of FREE information on developing mobile solutions with the .NET Compact Framework, you'll also have a chance to win a mobile device! Don't miss it.

Posted by PSteele | 1 comment(s)

Jonathon Goodyear on Rich vs. Browser Interfaces

Granted, browser applications still have their place for simple data entry applications, cross platform applications or websites for public consumption (among other things) there is just so much more that you can do with Windows Forms than with ASP.NET (even jumping through hoops). The deployment model for rich client applications is getting more and more streamlined and simple, so the arguments against them are beginning to dwindle.

Source: Rich Client or Browser Interface

Posted by PSteele | with no comments

Differences in WinForms ListBox and ASP.NET ListBox

In regards to my sample code "Adjusting to life without ItemData", I've had a few emails asking if this will work in ASP.NET as well. Unfortunately, it won't. The ASP.NET ListBox.Items collection is a ListItemCollection object. This collection's Add method only accepts ListItem objects which contain a simple Text/Value pair. This is all because of the way this gets translated down to HTML using the standard <OPTION> tag.

One option is if you're collection has a unique string key, use that as the "Value" property of the ListItem and then set the ListItem.Text to whatever you want displayed in the listbox. On PostBack, you can get the value of the currently selected ListItem and use that to index back into your collection.

Posted by PSteele | with no comments

Rich UI in a browser?

Rocky Lhotka blogs about the "browser wars" and presents an interesting view on it's use:

Sure, some people are foolish enough to use the browser as a programming platform (as in using client-side script to do a rich UI). Those poor people are stuck with IE (or whatever browser they targeted), but that is a poor strategy anyway. Note the total lack of development tools support for client-side programming. There's not a vendor out there who is encouraging or enabling client-side programming. It is a total dead-end wasted investment in the long run.
Posted by PSteele | 2 comment(s)
More Posts Next page »