web development puzzles - Hendrik Swanepoel

Hendrik Swanepoel

web development puzzles

I stumbled onto 2 weird web development thingy majigs today. Nothing awe inspiring, but here goes....

first:

When populating options into a dropdown on the client-side dynamically, I got an invalid argument error. I couldn't figure it out. I have done this before and I double checked the code in MSDN.

It turns out that I got the sequence wrong. You shouldn't create the option, set it's properties and then add it to the dropdown. You should create the option, add it to the dropdown's options collection, then set the properties of the option (value and innerText). weird....

secondly:

When setting the .Text property of an asp.net password textbox (a textbox with it's TextMode property set to Password) on the server side, on the client-side it remains empty. I've seen several weird forms in the past when it comes to password editing in your profile, so I decided to do a quick spike test. It turns out that this is by design (which makes sense), because it wouldn't be secure to send the value back to the browser, even if it's hashed, seeing that any person can then view the source of the page.. So you have to design the form around this fact.

 

Posted: Sep 29 2004, 02:17 PM by hendrik | with no comments
Filed under:
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: