January 2004 - Posts
I do not often write a block of code and sit for a few moments to admire it before moving onto the next task, but the economy of using XML with ADO.NET DataRows to generate a list from two different XML files was too sweet to disregard. In 15 minutes and 12 lines of code I was able to display a dynamically generated item list from an XML file based on a record ID passed to it during an OnItemDataBound event.
I've done similar tasks before with dataview filtering. This resulted in more lines of code and wasn't nearly as efficient as using the datarow from a datatable.select.
private string MenuSubItems(int plid)
DataSet ds = new DataSet();
ds.Tables.TableName = "subplaces";
DataRow dtrows = ds.Tables.Select("plid = " + plid.ToString(),"pltitle asc");
string s = "";
for (int i = 0; i < dtrows.Length; i++)
s += dtrows[i]["pltitle"].ToString() + "\n";
I haven't mentioned lately how much I appreciate ScottW releasing the source to .Text, but I'm doing so again now. I put a 4th community weblog online for our company. Thanks, Scott!
I've commented on the .text-based sites I was working on in previous posts (under the .Text category), how they support email subscriptions (in addition to RSS), are multi-blog, multi-user, hook into company data, etc. The value of ScottW's .text weblogs in our environment (with the customizations to the 0.94 source I was able to add) is obvious.
Only one weblog was initially planned--to track project event activity--but shortly after seeing this I was asked for another, then another, and finally (for now) a “Lessons Learned“ weblog. Its breakout is by department, then operational area or topic for the department, as in “IT : Server Management.”
Another strength of Scott's framework is that once the initial customization was done (less than a week), the turnaround for a new weblog is less than a day's worth of coding and customizing. Change the skin, change some logic, change a connection string, run the customized SQL script for the new database, setup the virtual directory, and you're rockin'. The trick, of course, is to keep cross compatibility in mind for all changes in any new weblog so that when going back to update earlier weblog code, nothing is broken.
To organize management and ongoing development, the VS Solution window looks like the pic below. The web app ( in this case Llearnedlogs), would be swapped out, depending on the weblog being worked on, with the other modules being shared by all. Works for me.
Once our users become more weblog sophisticated and have aggregators on their desktops, I have no doubt they will want individual weblogs as well. This would be sweet, because it would give me a chance to use Scott's 0.95 release for it.
I caught my first .NET Rocks! show today with Rory Blyth. I knew about the show for a while now and really honestly wanted to be able to catch some shows. The only reason I hadn't was that I work from home, rarely drive anymore, and unlike listening to music while coding, I felt that the interviews would be a distraction to my ability to concentrate on coding. But today I had to put that theory to the test. I mean, after all, it was Rory Blyth!
Its funny, really, that I put off listening to interviews with Don Box, Scoble, Sells, Gentile, Guthrie, Esposito, etcetera, etcetera, but I make sure that I'm going to listen to Rory Blyth and to heck with any coding distractions!
It was a great show, btw, and depending on the type of code-related work you might be doing at the time, it is a-okay to listen to Carl's show and still be productive. You might be distracted afterwards with images of milk shooting out of Bill Gates' nose, but that's another matter.
Like many using Newsgator as their aggregator, my list of subscriptions can be lengthy. The long list of subscription folders on the same level is not only inefficient, but tends to invoke the sense of being overwhelmed, with lots of bold font telling me I am way behind in my reading.
So I had the brilliant idea (only because it was so obvious and I had never thought of it before) to create subfolders under the default Newsgator folder. Because they were weblog subscriptions and newsgator created them, I treated them as different and that they were unmoveable. I used Sharpreader for a bit and liked being able to categorize subscriptions. Somehow I never thought I could extend the same categorization arrangement to Newsgator. Looks like I can. Sweet.
I happened to catch ST:TNG on Spike TV tonight, a season #2 episode titled Contagion where the Enterprise goes into the neutral zone to follow a sister ship which is experiencing system-wide failure and shortly explodes. And of course, there's a Romulan vessel cloaked on its tail. (I never knew why the Romulans thought they owned the Neutral Zone, I mean, its the neutral zone.)
It was a great example of how a virus infiltrated the Enterprise's computer system which they picked up when they transferred the logs from the doomed sister ship. But what was really interesting to me was how Jean Luc scanned the ship's captain's logs for any references of two words (I forget which. Probably someone on this list knows what they were. :-) And the computer brought back snippets of video of the captain's video logs (I'll call them blogs) which chronicled the musings of the ship's captain providing Jean Luc great insight into what destroyed their ship. The downside, of course, was that those blogs had a virus. The fact that Captain Picard's door didn't open immediately when he stepped onto the bridge afterward was a dead giveaway.
Yesterday I needed to remove a dropdown list and accompanying webcontrol from a wizard that has been in use for some time.
The dropdown appeared on the .ASPX, it had an accompanying LinkButton which displayed a subform to add a new dropdown item if required. The subform was a separate webcontrol. It struck me as I was removing the various traces of the dropdown and accompanying control that I could have done a better job designing the dropdown and control as a separate piece which could be plugged-in or removed with minimal coding and no impact on the rest of the webform.
The dropdown selection was part of the webform's final processing logic, its appearance was spawned in an earlier method. I don't readily see how this could have been avoided, but I can only consider how a more widget plug-in design where the webform is only conditionally tied to the widget data would benefit overall application design.
It is not often when a field requires removal, but it should be as easy as deleting some lines on a ASPX or ASCX page when it does.
This is thanks to a microsoft.public.sharepoint.portalserver post by Edward Lee. The MS White Paper's intent is to provide a SPS feature comparison between Office 2000, XP, and 2003 and SPS2003. Its valuable for no other reason than a lengthy set of Sharepoint features at the end of the document. Getting me juiced for an upgrade. (Considering the anticipated pain of upgrading, I'll need lots of juice.)
The original beef is posted here, describing how launching Sharepoint docs from IE in their native office apps with full Sharpeoint document management functions using the
var objDoc = new ActiveXObject('Sharepoint.OpenDocuments.1');
approach refused to work after upgrading to WindowsXP Professional from W2K Professional, in spite of the numerous attempts at resolution.
The issue is now resolved thanks to our Network Admin Support Ex-Marine and All-around Superstud. The beef is now a 20-oz slab of prime rib, a nice Medium Rare, with au jus and horseradish sauce on the side.
The issue was not WindowsXP Professional, but Office 2003, which was installed in conjunction with the XP Pro upgrades. Furthermore, these were on brand spankin' new workstations with no prior versions of SPS Client or Office installed.
I just can't say enough about my Network Admin guys (an admin and his assistant--the Superstud.) I am so incredibly lucky to have such great guys on my team!
The fix. Office 2003, depending on the release, I am assuming, does not install the Sharepoint Support Services found under Office Tools by default. My MSDN version of Office DID install these components by default, which made the situation a bit more perplexing to analyze.
So the fix was to install the Sharepoint Support Services components under Office Tools, which were not installed by default. Screenshot below of what I'm talking about.
I've been using Cloudmark's Spamnet for months and allow the $1.99 to be tapped from my credit card promptly on the 3rd of each month. (Hey, they have their billing act down.) I get hundreds of spam messages of day like a lot of other nerds, and all-in-all, Spamnet does a decent job. But occasionally their servers are down, so when you tag a message to be blocked you will get a dialog as shown below.
No. None of those are correct, I'm afraid. Why don't they add a “4) We're experiencing problems which may or may not be due to our own ineptitude. We hope to be back online soon. Everything on your end is fine. We're really sorry.”
This bogus dialog message reminds me of those reboots in Windows 98/ME/whatever when your application crashes, you lose 4 hours of work, then the OS hangs as well, and you have to physically unplug and plug back in the power cord to the PC. Then on reboot you are faced with the message “YOU DID NOT SHUTDOWN YOUR COMPUTER CORRECTLY.”
We thought we discovered something great when we started using the ActiveXObject('Sharepoint.OpenDocuments.1') approach recently to open Office docs with full Sharepoint 2001 check-out/Document Management support from within IE.
var objDoc = new ActiveXObject('Sharepoint.OpenDocuments.1');
The code is an excerpt from the updated FolderItemsPart.xsl webpart available from MS here.
Then we started upgrading workstations from W2K3 Professional to Windows XP Professional and it stopped working! The webpart doesn't work either.
We turned off “browse in same window“ in Folder-->Folder Options-->Filetypes-->Advanced. That opened in native Word alright, but we lost the ability to check-out or do any SPS functions with the doc. We updated the Microsoft Windows Script located here, we registered \windows\system32\scrrun.dll. We reinstalled the SPS 2003 Client Components found here. Nothin'.
We could direct people to the folder containing the doc, then the user could open the doc with full Sharepoint DM support, but oh, darn, if the URL is longer than 100 characters, the folder won't OPEN in a window. (That beef is located here.)
More Posts Next page »