Archive for May, 2007

ASP.NET 2.0, Dropdowns

I’ll keep this as short as possible. I’ve been doing more ASP.NET 2.0 development at work. Sometimes I’m amazed at how simple and fast you can do something. Other times I’m horrified at how lacking it is. I have nothing particularly against ASP.NET 2.0, but if it was something opensource… people would be fixing these petty problems. Here’s an example:

You have a drop down list on a page that is DataBound to a list of items. These items all appear on the page, but you may have to scroll to them. You want to let the use select the item from the drop down and scroll to it (with the magic of anchor tags). Typically you add an “onchange” event to call some javascript that does this. Something simple like: window.location = “#item_id”;

Unfortunately, ASP.NET 2.0 doesn’t want you to do client side scripting with their controls, so you left with these options:
1. Render the control manually in the ASP page. This is the method we’ve been doing for years, creating large unreadable source pages. It’s what all this ASP control jazz is supposed to fix.
2. Extend or rewrite a new control that accepts this property with no complaints. This may already be done by someone out there. Down side is you add a dependency to your project and usually get a bunch of other crap you didn’t want. Extending it consumes some time, but if done write you can probably reuse it.
3. Add the ‘onchange’ attribute to the control with some code: controlName.Attributes.Add(“onChange”,”javascript: return confirm(“Are you sure?”);”); This works, but you end up combining your view and control code, which once again is something ASP was supposed to fix…

None of these solutions are particularly good. When I worked on a site that used Castle I found many similar problems with their “Helpers”. I submitted updates to them, so everyone benefited. With Microsofts ASP.NET, we have to bitch about it. Send in a request. Wait. Wait some more. Then maybe they integrate the requested fix/feature in the next version. The whole process taking years usually.

Note: I’m not endorsing the use of Castle. It’s relatively mature, but doesn’t provide much of an advantage over a well designed asp.net site. Also, to do anything moderately well in ASP.NET, you should understand their DataSource stuff. For larger sites, be prepared to write your own datasource handlers, because the ones they provide are limited in their usefulness on large sets of data (e.g., they retrieve full sets of data before pagination or sorting).

Comments (2)

I tell myself

I tell myself I’m okay,
That I what I feel is okay,
That it’s normal, sane, and in every way… okay.

I tell myself it’s alright to feel,
The accept the intensity of what I feel,
That it’s fine to feel the way I do.

I tell myself it’s alright to be scared,
Everyone feels the same way and that’s okay,
It’s alright to feel scared, I’ll be okay.

Comments

In the moments

Every once and a while I sort snap into that “In the moment” sort of feeling. I’ve read a fair number of crazy people rants about how always living in the moment: great, liberating, great, fantastic, uplifting, free, great, spiritual, unleashing, great, etc… Now, when I do get these brief episodes of being in the moment, they often come when I least expect them.
Read the rest of this entry »

Comments

I often feel…

I often feel like my relationships move too fast. This stems from the fact that I see a relationship as something that takes time to build. Now this isn’t always bad that it’s fast, it just means that my expectation are always kinda out of kilter. I don’t always expect the same things from relationships over the same amounts of time. It’s all subjective and with the flow for the most part. I usually just always get this feeling that I’m moving things along faster than I should. Well, perhaps that’s no longer a problem…
Read the rest of this entry »

Comments

Wiimote + Cell Phone = Profit

We’re at coffee tonight and we’re talking about the craziness that is patents. It occurs to us that many of the patents are just the same old technology, but on a cellphone or wireless network of some sort. This is obviously silly for many reasons, mostly that putting something on wireless these days is trivial… and that cellphones are essentially computers. So it stands to reason, if companies in the US can get away with filling this sort of patents… and defending them. Well, obviously there is money to be made by just… making patents up with various applicable technologies. So I present to you, our first prior art claim to… the motion gesture interface to cellphones.
Read the rest of this entry »

Comments