August 2003 - Posts

Excel as a Code Generator
21 August 03 03:38 PM | Scott Mitchell

I have been up in Orange County these past few days doing one-on-one training and consulting with an individual wanting to take his .NET skills to the next level. In any event, he showed me a neat little shortcut he uses for creating his ASP.NET Web pages and code-behind classes. In his job as an independent contractor, he is working for a company that needs a lot of data entry Web Forms, all of which are gargantuous in the amount of data needed to be collected. For example, he'll get sent an Excel spreadsheet listing over 200 fields they want to capture in a Web Form.

Clearly creating a Web Form with 200 Web controls could take all day; adding the code to insert the data into the table could take another full day. And, to top it off, both tasks are extremely repetitive and boring. This gentleman's solution, I thought, was rather clever. He creates an Excel spreadsheet and copies over the names and descriptions of the fields they want. He then specifies the database fields these various entries refer to. Then, for each row in the spreadsheet, he has a few columns that essentially piece together the values in the other columns along with code or HTML/Web control markup. The end result? After he has copied over the 200 fields and descriptions and has specified the database fields the input fields relate to, he can literally just cut and paste the generated HTML into the HTML view in VS.NET and his UI is done. He can then cut and paste the database updating/inserting code into his code-behind class, and he's just about finished the Web Form.

Granted, he should be using a DAL and business objects, and a tool specifically designed for code generation, like CodeSmith or LLBL Gen, but, regardless, I had never thought of Excel as a tool one would use to generate HTML and source code. Neat.

Filed under:
James Avery is a God Among Men
19 August 03 07:12 PM | Scott Mitchell
I owe James Avery a beer. He has written stellar reviews for NUnit and CodeSmith for .NET Toolbox. A nice follow-up would be a review on the NUnit add-in: Jamie Cansdale, care to tell the world about your tool? Thanks again, James.
Filed under:
Have you Used SharpDevelop?
17 August 03 03:12 PM | Scott Mitchell | 1 comment(s)

Have you used SharpDevelop before as a C# editor? It's an open-source, free IDE for WinForms C# development. If you have used it, what are your thoughts about it? Can it compete with VS.NET? Does it have its place in the .NET developer's toolbox?

If you have used this product, perhaps you'd like to write a short review of it and share it with others on the .NET Toolbox.

Filed under:
.NET Toolbox Updated
14 August 03 08:35 PM | Scott Mitchell

My fiancee and I have been working on and off on the .NET Toolbox back-end. My fiancee added support for listing all reviewers, and a Web interface for the 10 most recent reviews. (There is also an RSS feed for the most recent reviews.) Also, per Nauman Leghari's suggestion I have extended each review to not only include comments and screenshots, but also recommended articles. Also, with my fiancee's help, we have finished cleaning up my initially ugly code; .NET Toolbox now uses a solid object model and DAL with which user controls and ASP.NET Web pages interact with.

While the back-end material is coming along nicely, I've yet to have an opportunity to write more reviews. Bummer, because that's what will attract and keep people. So... I am imploring you to write a review of a free .NET tool, one that you find indespensible.

Right now, I've been trying to keep .NET Toolbox pretty low key - I've only talked about it here on my blog and have not mentioned it on 4Guys or asked other ASP.NET Web sites to link to it/pimp it. If nothing else, examining the stats for .NET Toolbox gives me a good indication of how many (or, perhaps, few) people read my blog! :-) Over the past three days, has received a total of 171 unique visitors, averaging about 125 visites per day, and 475 page views per day. Total bandwidth consumed: 6.93 MB. (These numbers are higher than I initially assumed - more than 100 people reading my blog! How eerie. :-) ) It will be interesting to compare these statistics to the stats after I “get the word out” about the site.

Filed under:
Two New Articles
14 August 03 11:20 AM | Scott Mitchell

My two latest articles are up on the ASP.NET Dev Center at MSDN. They are:

You can also check out my other articles up on the MSDN site as well. Also, I should have another two articles up on the site within the next month. Keep your eyes peeled. :-)

Filed under:
Improving the Blog Commenting Experience
13 August 03 06:04 PM | Scott Mitchell

I started reading blogs regularly at a few months ago and got hooked - I enjoy reading ideas, thoughts, advice, and rants from fellow ASP.NET developers and am subscribed to many RSS feeds. From my understanding, the main motivation for blogs is two-fold: to serve as an expressive outlet for the blogger, and to build community, by creating a somewhat social and familiar atmosphere among individuals who share a common interest.

Clearly, a community grows best when all of its members can actively participate in a discussion. While a blog is primarily a one-way communication medium - that is, the blogger posts his statements for the world to read - the experience is often enhanced by allowing those who read the blog to leave feedback in the form of comments, that all can view and respond to.

Unfortunately, the user experience for comments in a blog leaves much to be desired (at least in the blogs I've visited, which are a cross-section of many blogging engines). The features that are missing, in order of importance, are:

  • Lack of accounts, meaning you have to re-enter your information (yes, I know many blog systems use cookies to remember your username/email/URL/etc., but if you use different computers often, or different browsers, it can be a pain). Furthermore, due to the nature of cookies, each blog site requires you to re-enter this information.
  • Lack of the ability to respond to a particular post. Personally, I love threaded discussions (a la Slashdot/Kuro5hin/ It's a little annoying to have one long list of posts, not being able to tell if one post is a response to another.
  • Lack of notification when someone replies to your comment. The only way today to determine if someone has responded to one of your comments is to recheck the blog entry's comment page. This is annoying. Ideally, one could opt to receive emails when someone replied to one of their posts, or there could be an RSS feed that individual users could subscribe to in order to see their posts and who has responded.
  • Lack of rich formatting of a comment. While I don't necessarily want people to be able to insert HTML that can negatively effect the layout of the site, why can't I use bold tags or italics to emphasis a word or phrase in my comment? Also, every blog system should auto-convert URLs to HREFs, or at least allow the HTML <a> tag in the post body.\

While clearly threaded discussions and rich-formatting could be applied to blogging engines on an engine-by-engine basis, notifications and accounts would need to be managed globally somehow, so that my notifications and account would travel with me, from one blog to another.

This is a tall order, obviously, and I don't have an answer for how this could realistically be implemented. What would be the benefit (read, revenue stream) for the implementor? Would blog readers use such a service? Would blog engine writers add support for such a service into their software?

Since these “global” features may be pie-in-the-sky fantasy for now, let's instead focus on what can be accomplished in the present: blog engine software makers adding richer comment support, so as to support threaded discussions and richer comments. Why don't I see these basic features in blog comment systems today? They are present in many Web sites (like Slashdot), so why not blogs?

Now .NET Toolbox
11 August 03 08:07 PM | Scott Mitchell

In an earlier blog entry I mentioned a new Web site I had created, ASP.NET Toolbox, and asked for feedback, suggestions, help, and reviews. While no one has yet volunteered to write any reviews <hint, hint! :-)>, I was surprised by the number of excellent pieces of feedback many of you sent.

For example, Erik Porter suggested adding search capabilities, something I had completely overlooked. This will get added soon, Erik, I promise! :-) Another stellar suggestion came from James Avery, who suggested that I enlarge the focus of the site to include .NET tools in general, not just ASP.NET tools. James also advised that I broaden the scope to include both free and non-free tools. I have decided, at this point in time, to take James' first bit of advice, but to hold of (for now) on the second bit. Assuming your ISP's DNS server has been updated recently, you can hit the site now at

I spent parts of yesterday and today cleaning up the insanely ugly code I had written on Friday. On Friday, I just hammered out the code to get the site working. Yesterday and today I “did it right,” building an object model, a DAL that utilizes the Microsoft Data Access Application Block, and so on. I still need to add a gaggle of features - like searching, most recent reviews added, list of all reviewers, most recent comments, etc. - but for now, at least, the code is a lot easier to work with. The end plan is to eventually get the site's code up on the GotDotNet Workspaces so others who have expressed interest in helping out on the project , such as Erik Porter, Steve Smith, and others, will be able to do so if they are still interested.

I hate to beg, but let me reiterate, the most helpful thing that one could do is to take the time to write up a review for a free .NET tool that they find indispensible. There are a number of such tools that would be worthwhile, and I'm hoping someone will step up to the plate and offer to take charge. Some of the tools I'd like to see reviews for include:

And, of course, others I might not know about. Thanks for those who help in any way. :-)

Filed under:
A New ASP.NET Web Site
10 August 03 09:37 AM | Scott Mitchell

A few days ago, Steve Smith asked on a listserv I'm on what people thought some good, free ASP.NET tools were - he was interested in writing an article listing the “Top 10” or so. Never being one to pass up an opportunity to one-up Steve, I decided to crank out an entire Web site dedicated to this, rather than a Top 10 list. :-)

Anyway, I spent Friday jamming out the code and the site it now live:

The focus of the site is to serve as reviews for free ASP.NET tools. (Emphasis on “free,“ if you couldn't tell. )

I need your help! Right now, the site only has a small handful of recommended tools, such as FxCop, the Data Access Application Block, Web Matrix, Reflector, .Text, etc. Naturally, I'd like many, many more listed and reviewed. This is where I can use your help! (Yes, you, the two people who read this blog!) Namely, I would appreciate if you could help with any of the following:

  • Review the site, and let me know if you encounter any bugs, anamolies, or have any suggestions on how to improve the UI or look and feel.
  • Suggest any potential categories for tools.
  • Leave comments/ratings for existing tools reviewed.
  • Create a review for a free tool not currently listed. If you do this, there will be a special place in heaven reserved for you, and happiness will follow you throughout your life. To learn more about submitting a review, check out

Hope you can find the time to help. Once the tool database gets built up a bit further, I plan on some hard-core publicizing of the site, so your reviews and comments will definitely be read and used by others. Thanks for any help you can muster.

Filed under:
Do You Write Fiction?
05 August 03 11:16 AM | Scott Mitchell

I used to write a lot of fiction, starting back in elementary school and continuing through high school. This came to a rather abrupt end starting in college, and I've often wondered why. If you didn't know anything about the school I went to, the University of Missouri - Rolla, then you might think that perhaps the busy social life college presents distracted my from writing. But, if you have heard of Rolla, or experienced UMR, then you know that Rolla is in the middle of nowhere, has a ratio of four guys to every girl, and is about as socially rambunctious as a funeral parlor in a war-stricken corner of the world.

Fellow UMR alums might conclude that Rolla merely sucked the life force and creative juices from my very marrow. But, if this explanation were true, then wouldn't the fiction writing resume upon my escape from Rolla? When I graduated from UMR I came out here to San Diego and, initially, tried to restart the writing. First, I tried to just sit down and write. Sadly, that didn't go to well. After struggling with getting started writing fiction again, I decided to step up my efforts, and started going to a weekly Writer's Workshop. This workshop took place every Wednesday from 1:00 to 2:00 in the afternoon. Due to its working-day hours, the group was me, unemployed people, and housewives. Don't get me wrong, there were some very talented writers in the group - some of those unemployed folks were starving artists, working on the American Novel.

The woman organizing the event started each session by announcing the germ of our writing by means of a simple sentence. The one that sticks out in my mind was, "I came into the kitchen, and pudding was everywhere." Then, we took this idea and wrote for half an hour to 45 minutes, after which we shared our works with the others by reading them aloud.

While the workshop was entertaining and a good break, the writing during the meeting still felt forced. During these writing workshop visits, though, I was starting to date the woman who would become my fiancee and soon-to-be-wife, so that provided some inspiration for writing. What I often found myself doing, though, was writing at home when the fancy struck, and then, essentially, repeating my earlier writings at the workshop, trying desperately to fit them into the starter-sentence given to us for that day.

I stopped going to the workshop after a month and a half, or so, but what really has stuck in my mind since attending is the stark difference in reality-perception between myself and some of the other writers. Some of the better fiction writers at this workshop always wrote about the same set of fictional characters, and the events that transpired. In the socialization that inevitible occured both before and after the workshop, these people would talk about these characters as if the really existed. They'd let people know what events had recently transpired for these characters, and what was new in their "lives." It's as if these people could write fiction so well because they had a hard time disambiguating between fact and fiction in reality.

So, sadly, I haven't written fiction since high school. Sure, there were some short bursts a couple years ago soon after moving to San Diego, but nothing I'm especially proud of. This leads me back to my original question - why is it that I used to be able to write fiction so fluidly, but can do so no longer? The answer, I fear, is computer science.

In order to be a good computer programmer, your mind has to be trained to think in a very straightforward, logical way. With logic (and therefore computer science), there are infallible rules that govern how reality functions. If a implies b, and a occurs, then b will occur. By its very name, fiction does not imply such rigidity. Writing fiction and programming comptuers pits the mind in a conflict, and either the programming or the fiction is bound to suffer.

Do these ideas hold merit? Can one be a stellar computer programmer and a superb author of fiction? I have no doubt that there are some insanely brilliant individuals who can do both exceptionally well, but I'd be willing to wager dollars to donuts that writing fiction and programming are diametric tasks.

Filed under:
Two New Articles up at the MSDN ASP.NET Section
01 August 03 12:46 PM | Scott Mitchell

Two new articles up at the ASP.NET MSDN section are authored by yours truly.

The first, Creating an Online RSS News Aggregator with ASP.NET, examines both how to build an RSS syndication feed via ASP.NET, and how to create a full-blown online news aggregator to aggregate news from disparate syndication feeds.

The second article, Using the TreeView IE Web Control, provides an overview of the TreeView Web control, one of the Internet Explorer Web controls. For more information on the IE Web controls, check out: Learn More About the Internet Explorer Web Controls.

I have a couple more articles that will be appearing on the ASP.NET section on MSDN in the near future. One is on creating a DataGrid that is both pageable and sortable; another is on injecting client-side code from an ASP.NET server control.

Filed under:
More Posts


My Books

  • Teach Yourself ASP.NET 4 in 24 Hours
  • Teach Yourself ASP.NET 3.5 in 24 Hours
  • Teach Yourself ASP.NET 2.0 in 24 Hours
  • ASP.NET Data Web Controls Kick Start
  • ASP.NET: Tips, Tutorials, and Code
  • Designing Active Server Pages
  • Teach Yourself Active Server Pages 3.0 in 21 Days

I am a Microsoft MVP for ASP.NET.

I am an ASPInsider.