Jeff Makes Software
The software musings of Jeff Putz
-
DropDownList still doesn't support optgroups?
Am I crazy, or am I seeing that you still can't do optgroups in a DropDownList in v2 of ASP.NET? It's one thing making the controls XHTML compliant, quite another having them do everything the XHTML schema will allow. You can't even inherit ListItem to hack out your own version. Lame!
Not that it's hard to implement, but come on guys... don't take short cuts!
-
Why we still suck at teaching people how to code with ASP.NET
I use "suck" too much in blog titles.
I've mentioned here and there that an experience gap and general poor education leads to a developer community that just isn't what it could be. Maybe the thing that bothers me the most is that authors and People Who Know(TM) don't teach very well.
I tried to do what I could with my book, and I've had almost universally positive feedback. Hey, I'm not that far removed from the people I'm trying to teach, so I feel their pain. I've been trying to post more often in the www.asp.net forums as well, but that happens in brief spurts. I'm doing what I can, when I can.
I still find stuff from time to time that I have to learn myself, and I find it staggering that Web examples and books always suck at this. The approach is always either too complex or short but lacks explanation. That's seriously annoying. For example, I recently wanted to build some templated controls. One of the books I have (name withheld to protect the guilty) spends five pages of code then 40 pages of explanation to build something so insanely complex that it's nearly worthless as a teaching tool. A Web-based article on MSDN was better, but still introduced complexity irrelevant to explaining the process. Eventually I figured it out, but only because I have a good feel for how stuff is supposed to work in general. I'd hate to be someone with less experience.
So for those of you generating content intended to teach people, whether it's by book, magazine, Web or whatever, keep it simple, stupid! The first application of new knowledge is rarely an instance of having to design space craft or a new microprocessor.
-
Really irritated with credit card fees for merchants
When you swipe your credit card to pay for something, you probably don't think much about it. It doesn't really cost you anything directly, if you pay off your balance every month. But the truth is that it does cost you something, because the merchants get screwed and they have to pass that cost on to you.
-
Component Art is good stuff
If you haven't seen the beta version of the new Component Art Web.UI Suite, check it out.
I was already planning on using this stuff for the project I'm on right now, and with the addition of their new Grid control, now I'm thinking I might want to get it even for my own stuff. It's not cheap, true, but I think their new Grid control beats the snot out of the Infragistics stuff (in part because half of their site doesn't even work in Firefox). The Callback control, wrapping pretty much anything into an AJAX control is sweet.
These guys are really clever, and I look forward to seeing their source code too. Not a cheap subscription, but I think it will be worth it.
-
My ten years in the wired world
Wired published a ten-year retrospect about stuff that changed the world. It's a really interesting read if you lived through all of that, and it makes me quite nostalgic! I've been writing code all day, so I need to write something humans can understand tonight. Thus... 10 Years That Changed The World (of Jeff Putz).
-
Upgrading with an Athlon 64
I upgraded Stephanie's computer today with a shiny new Athlon 64 3000+. She's had a 2 GHz P4 for almost three years, so it was time for an upgrade.
-
The default button on enter on an ASP.NET form
I haven't really thought about this in a long time, but after searching a bit and finding some really complex solutions, I figured out a way to fire a "click" based on pressing enter in a text field. It works OK in IE and Firefox, which is good enough for me, and it only requires one line.
EmailTextBox.Attributes.Add("onKeyPress", "javascript:if (event.keyCode == 13) __doPostBack('" + LoginButton.UniqueID + "','')");
"EmailTextBox" is as you might suspect a text box control, while "LoginButton" is a link button. All it does is render an extra attribute in the rendered tag that checks for a key press, and if it's the enter key, it fires ASP.NET's __doPostBack method with the unique ID of the button that you want to virtually press. That in turn fires off whatever server-side event handlers you've wired up. You could pass in the eventargument as the second parameter in that Javascript if you wanted to.
I can't understand why this wasn't included somewhere in v2. They did offer a default button for the entire form, but I think that only works if you have actual buttons (I use LinkButtons almost exclusively). You could actually wire up any control name here if you wanted.
-
Virtual Earth is so "me too" and kinda sucks
Have you seen that Microsoft launched Virtual Earth? Yeah, it's a rip off of Google Maps and Google Earth I guess, but it kind of sucks.
-
Populating a ProviderCollection from custom config in beta 2
I'm a little lost. I'm not clear on how to populate a ProviderCollection based on a custom configuration section. The way I first learned it (pre-beta) isn't possible anymore, and of course all of the docs appear to be placeholders.
For example, in web.config, I have something like this:
<mySection defaultProvider="PopForums">
<providers>
<add name="MyProvider" type="MyProvider, MyAssy" connectionStringName="Whatever" />
</providers>
</mySection>
Then my custom config section looks something like:
public class MySection : ConfigurationSection
{
[ConfigurationProperty("defaultProvider", DefaultValue = "Whatevah")]
public string DefaultProvider
{
get { return (string)base["defaultProvider"]; }
set { base["defaultProvider"] = value; }
}
[ConfigurationProperty("providers", RequiredValue = false)]
public ProviderCollection Providers
{
get { return (ProviderCollection)base["providers"]; }
}
}
Now how do I get this stuff initialized? The code I'm revisiting from a year ago doesn't even compile because the classes I used, some of them anyway, are gone. I can't find any newer examples.
-
Windows Vista... it's about time
The next Windows has a name, and finally, I feel like we can at least get somewhat excited about it.
The hype machine is important. Getting to beta 1 is important. Now it feels like a product that might ship some day.