Rom's Rants

Free-Roaming Hostility From A QA/Developer Perspective.

Wednesday, June 24, 2009

Unfortunately Accurate

Dilbert.com

(via Dilbert.com)

By the way, a new skin will be coming to the site shortly to move nav back to the left to keep things like this from getting chopped off by the nav.

posted by Michael Russell at | 0 Comments Links to this post | View blog reactions

Monday, June 22, 2009

Enforcing MaxLength On TextBox Controls

If you use ASP.NET, you've probably encountered situations where you need to restrict the overall length of input and you've tried using the MaxLength property on the TextBox controls.

For the most part, that works. Most browsers properly restrict the length on the client side. However, some browsers do not properly restrict the entry length, some browsers have loopholes that allow overlong entry (copy/paste, etc.), and you can't forget malicious users.

So you can properly restrict the sizes using ASP.NET's validators, do the following.

Drag over a CustomValidator and point it to the TextBox you want to enforce length limits on.

Point the CustomValidator's ServerValidate function to this function...



protected void TextLength_ServerValidate(object source, ServerValidateEventArgs args)
{
CustomValidator v = (CustomValidator)source;
if (v != null)
{
TextBox t = (TextBox)this.FindControl(v.ControlToValidate);
if (t != null && t.MaxLength > 0)
{
args.IsValid = args.Value.Length <= t.MaxLength;
return;
}
}
args.IsValid = true; // If custom validator wasn't set up correctly, assume valid
}

posted by Michael Russell at | 0 Comments Links to this post | View blog reactions

Sunday, June 07, 2009

Kait and Joel

This is my granddaughter Kait and Joel Hodgman from Mystery Science Theater 3000 and Cinematic Titanic.

Kait and Joel

I can't believe how much she has grown up. Tonight was her first live riff and she had a blast.

posted by Michael Russell at | 0 Comments Links to this post | View blog reactions

Sunday, May 24, 2009

Glenn Beck and Courts Overturning

I just want to say one thing regarding this little clip from Glenn Beck, one of the two loudest reasons I'm considering leaving the Republican party.


http://www.atheistmedia.com/2009/05/glenn-beck-californias-prop-8-about-to.html

Our Constitution has this particular separation of powers for one really good reason. It keeps the rights of the minority from being taken away or suppressed by the whims of the majority.

The exact same arguments were being made just over 30 years ago. Remember Loving v. Virginia?

posted by Michael Russell at | 1 Comments Links to this post | View blog reactions

Friday, May 01, 2009

"Done..."

Wow...six months of hardcore development and my current project is "done."

I'm putting "done" in quotes because we had to cut several corners to get the website to launch at the same time as the new back-end architecture, and aside from one really bad bug that I'm still trying to track down, the new build going live tonight should make things work significantly better.

Over the next week, I'll be filling in the feature gaps for what had to be delayed slightly, polishing up the features that need them, and hopefully find the database transaction issue that is affecting the first person after a process recycle.

I've put in 276 hours of work over the last three weeks. It's the worst crunch I have done since leaving Microsoft. I hope it will never happen again, but unfortunately I know better.

Tomorrow, haircut.

posted by Michael Russell at | 2 Comments Links to this post | View blog reactions

Search



Previous Posts

Archives

View Michael Russell's profile on LinkedIn

I use Blogger. Do you?

Subscribe to
Posts [Atom]

Add to Technorati Favorites
I'm an atheist.