rossisdead

Stuff about stuff.. and stuff

ASP.Net's TextBox class and MaxLength

You learn something new every day!

It appears that ASP.Net's TextBox class doesn't have any built-in validation for trimming the Text property's length if the MaxLength property is set to a value greater than zero.

I suppose this is to give user's more leeway in how they want to validate the control, but it's not immediately obvious that a user can get around this limitation just by altering the html! ie: A user could use the FireFox FireBug extension to remove the textbox input's maxlength attribute and load it up with as much text as they'd like!

So remember kids: Always validate your input!


My brain does work!

I'd been trying to get around the need to install SQL Compact for users that don't have it already. I'd read everything on msdn about how to do it, but my brain was just not comprehending the stupid easiness of it.

I had been trying to reference the private SQL Compact dlls in my project, thinking I was required to do that to get the private dlls to install. I'm an idiiot, and realized just now that I just need to copy the private dlls with the installer and continue to reference the regular dlls in my project.

*palm-forehead*


Crunch

Crunch, my diet and exercise tracking software, is coming along nicely! I think a public beta is in the near future.


About the author

rossisdead is a 26 year old web and desktop software developer from New Jersey. He has two cats and likes long walks on the beach.

Control panel


Archive