In my latest project, I found the need to use the RadioButtonList which spits out the absolute nastiest HTML to render it unusable (for me anyway). The control gives you to HTML options using the RepeatLayout attribute.
Flow spits out a series of span’s and label’s with BR’s if you don’t specify RepeatDirection of Horizontal. And choosing Table gives you a nicely unaccessible table you can’t format easily. Because of these limitation’s, I have always stayed away from CheckBoxList and RadioButtonList controls.
When Enterprise Library was called Microsoft Application Blocks, if you wanted to log an Exception, you would write (assuming “ex” is an Exception):
ExceptionManager.Publish(ex)
And if you wanted to log some extended properties you could do something like this:
NameValueCollection customerInfo = new NameValueCollection();
customerInfo.Add("name","scott");
customerInfo.Add("email","blah@blah.com");
ExceptionManager.Publish(ex,customerInfo);
Now that I am upgrading all legacy code to Enterprise Library 2006 for .NET 2.0, I couldn’t find a way to do this since the only way to log an error is:
This last week I was tasked with upgrading a Community Server 1.1 install to 2.0. I was expecting a simple process after navigating the seas of .Text to CS 2.0, but I forgot to “knock on wood”.
I ran the upgrade script as indicated in the upgrade instructions and got about 15 separate errors. I don’t remember what they all were, but there was about three missing fields in various tables that I had to add before the script would complete successfully.
Once that was done, I copied the new web files over the old ones, and tried browsing to ye’ ol’ default.aspx which resulted in a Yellow Page of Death.
We all know we shouldn’t have duplicates in the database. And despite my best efforts, somehow they sneak in from some legacy code, or from the hyper-active-compulsory-submit-the-form-fifty-times-in-five-seconds-bloke.
So now and then I find myself writing the same SQL to track them down. Most solutions online say that you have to use a temporary table or rename tables to get rid of them. This solution works without either, providing my way of eliminating the duplicates is sufficient for your needs.
As an aside, it was a bit of a pain to be able to insert this in my blog post. Do be able to do so, add the following to the markup/html node in communityserver.config:
<object width = "true" height = "true"/>
<param name = "true" value = "true"/>
<embed src = "true" type = "true" width = "true" height = "true"/>
Wow, that’s a mouthful. This is what I am trying to convey: When you do a Group By with Rollup, what happens is that the rolled up column shows null, and won’t necessarily be ordered at the bottom. For example:
select
firstname
, count(*) as total
from AdsEntered ads
join tblStaff s on s.staffid = ads.staffidgroup by firstname
with rollup
order by
total desc
This would output:
Now, I want the person with the highest total at the top, but I certainly don’t want the the total row being first. So the goal is to still sort descending, yet stick the total row at the bottom:
I made the leap and upgraded my blog to Community Server (CS) 2.0. It took about 4 hours researching, downloading, uploading, converting and fixing.
I couldn’t find a way to directly upgrade my .Text Version .95 directly to CS 2.0, so I decided to first upgrade from .95 to CS 1.1, then use the standard upgrade path from CS 1.1 to CS 2.0. Here is what I did in detail:
I just tried to open Sauce Reader, my blog reader of choice, but all it gave me was an error and an option to close. After digging through the error message, I found the message, “Class not registered”.
Ok, easy enough. I opened a command prompt and started to register each dll in the Sauce Reader directory. But wait, it wouldn’t let me run Registration Server. I tried:
regsrv
regsrv32
regsrv32
regsvr
regsvr32 (bingo)
I mean, that was pretty lame. In my defense, I seriously think the first season of The OC I was forced to sit through ejected this out of my head.
In my latest project, I need to build a lead system for our sales people. It will work very similarly to the digg.com/spy application, so I took advantage of their model in order to learn AJAX.NET.
I decided to go with AJAX.NET, rather than the new Anthem, just to get my feet wet. I will make it work in Anthem next.
This is what my example will look like:
and after you click the button:
Using AJAX, it went and grabbed a new item, and inserted it to the top row, and removed the bottom row. Digg’s Spy is obviously nicer, but it does essentially the same thing.
By far my favorite technical author is Jeffrey Richter. The combination of clarity, depth and slight humor is simply unrivalled in the computer industry.
Several times I have done searches trying to find out when he would have a new book coming out. I have read his Applied .NET Framework cover to cover, and almost cover to cover again and I get jonesing for some updated Richter.
Tonight, I stroke gold.
Comes out February 22nd, baby! You better pre-order now, it is going to go faster than the Xbox 360!