2003-05-15

ASP.NET Set Focus by Scott Guthrie

Wow.

This is the cleanest solution to one of ASP.NET most common problems, setting focus:

Scott Guthrie notes in his Blackbelt WebForms presentation:


Sub SetFocus(ByVal controlToFocus As Control)

Dim scriptFunction As New StringBuilder
Dim scriptClientId As String

scriptClientId = controlToFocus.ClientID

scriptFunction.Append("<script language='javascript'>")
scriptFunction.Append("document.getElementById('")
scriptFunction.Append(scriptClientId)
scriptFunction.Append("').focus();")
scriptFunction.Append("</script>")

RegisterStartupScript("focus", scriptFunction.ToString())

End Sub



Almond Accents

We (Paramount Farms) just released a new website for our product Almond Accents. If you like to cook there's a nice set of recipes.

Rob's Movie line thursday ... I got the answer!

"Last weeks movie line was a bit of a bust, two guesses, both correct. I don't really get that many to start with but I'd like to get at least ten at some point. So in honor of blockbuster summer I'm throwing EVERYBODY a bone. If all two visitors don't get this line I'll be shocked.

Ready, set, GO...
This is your last chance. After this, there is no turning back. You take the blue pill - the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill - you stay in Wonderland and I show you how deep the rabbit-hole goes"
[at the core]

Ahhh ... that's from the movie: "Scoble does Microsoft"

2003-05-13

The ultimate mouse trap (you've gotta see this...really!)

This is awesome!

http://multimedia.honda-eu.com/accord/

Make sure you follow the instructions (click on the cog).

It's also available here: http://home.attbi.com/~bernhard36/honda-ad.html

2003-05-12

Pass XML around tiers

I'd love to see the responses to this question:

"This is a simple one - how do you pass XML between layers and/or tiers? I'm not looking for the philosophical answer. I'm looking for the physical answer. We can debate the philosophical later." [News from the Forest]

I typically avoid passing around XML but when I have in the past it's been "string" or "XmlNode'. I like to do the parsing up front and pass around structs or arrays. For large documents I just pass the URL or Filename.