- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
This is funny, but it's not entirely fair... post the body of the Beep() method. :)
Admin
That's a built in vb.net function. Just tested it out and it does indeed make the server beep...
Admin
Classic.... I'm sure this developer swears it works on his machine....
-Andy
Admin
How do you generate a client side beep using ASP? I saw a java applet solution but I couldn't find anything related to asp :(
Admin
javascript alerts beep.
Admin
This tool probably runs IIS on his development machine. Naturally, the Beep function will invoke the desired response.
LMAO!
Admin
Maybe he had it in there for debugging purposes and never stripped it out? Or ... he could just be a schmuck. Let's be glad he didn't use a message box.
Admin
If he used a message box the script would time out unless the admin clicked on it, haha!
Admin
i remember when i used to make mistakes like that all the time. The one that really got me was having a loop changing the contents of a label, and siting around waiting for the contents of the label to be updated on my screen. The good old days. That was nearly 10 years ago. Actually, just this week, I coded:
IDesignerHost host ....;
host.CreateComponent(typeof(Button));
and scrateched away 10% of my hair wondering why the button never appeared in the form on the designer surface. LMAO.
Have a nice day ...
Admin
well it could be a custom beep function (not vb built in)
something like this:
sub Beep()
response.Write("<script lang=...")
response.Write("..whatevery you do in javascript to beep")
response.Write("</script>")
end sub
i do the same but for window navigation ,eg opening new windows via server code
//Roger
Admin
another question: why is he HtmlEncoding the QnumAs item?? Perhaps he is looking for CInt()?? ;-)
Admin
Excellent, server-side beeps. I hope they have a volume control!
And finally a more useless usage of the Beep command than my submission ( http://TheDailyWTF.com/archive/2004/07/21/628.aspx ).
Admin
Very funny, you can make a server beep evey time you have a new visitor or everytime you sell something over the web! so not entirley useless!!
Admin
A more reasonable explanation:
In this server room, there is a large microphone positioned next to the server. This microphone is attached to a GIANT DEATH ROBOT.
When the server beeps, the ROBOT is dispatched... it has your IP Address... soon it will have you...
Admin
I made the sane mistake with a COM+ class once. I swear it worked quite perfect, locally!
Admin
same, not sane.
Admin
This is a classical but sad example of a breed or programmers that know the syntax but don't understand squat about how the program runs.
As noted, the HtmlEncode is pretty intriguing... It must have Option Strict Off.
Admin
This application is a web-based test for students. Each time a student summits a blank answer, it will Beep() to inform the teacher. And s/he will taking approaching the guilty student with cane in hand.
Admin
The alert() thing is funny.
I wrote a Group Policy extension this spring. Those things are loaded by winlogon. Now, when you fail an ASSERT() in a debug build (of anything), it pops up a dialog, and sits there and blocks until somebody clicks on a button. However, it turns out that when winlogon shows a dialog, the user can't see the dialog until logging out (winlogon ought not to be doing that, anyway). So it looked like the poor GPx just sort of fell into a coma at some point, and then suddenly woke up and crashed later on.
You can imagine the hilarity that ensued before I realized what was happening. Thank God for remote debugging.
Admin
um while the Beep() is beautiful whatever happened to the requiredfieldvalidator?
Admin
to karpo : i agree with you. it's not sane by any means.
Admin
OK, I am an ex VB'er, and I find this code insane, but I would like to comment on another aspect of this code. VB.Net developers, learn short circuiting! PLEASE. His second if statement could be so much more effecient. Of course he may want it to work the way it does, but I don't have the spec.... ;-p
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbls7/html/vblrfvbspec11_10_1.asp
Admin
Tim,
OrElse what?
Admin
cc
Admin
Tim,
Seems to me that a language with non-short-circuiting boolean AND and OR by default is a WTF unto itself.
And if they're so damn smart, where's their short-circuiting boolean EXCLUSIVE OR, eh? EH? Let's see it! C'mon, I dare ya!
Admin
Problem was / is that there was a LOT of pre-existing VB6 code that would have been broken if MSFT had converted the logical operators to true short circuiting operators. Same thing with the whole base 0 thing. IMHO MSFT should have stuck to their guns, said that VB'ers would need to re-work their code (IT IS a <b>NEW</b> language anyway), and rewrite properly.... Sigh, OH well.....
Admin
Tim: Actually, I'm with MS on that one. The chaos would be beyond belief and everybody would hate them (not just Slashdot).
I mean, it wasn't a general drastic cleanup of the language anyway, was it?
Admin
About the messages boxes...
Just wait ;)
Jake
Admin
I just don't get it. why doesn't beep() work?
LMAO
Admin
actually use page.registerstartupscript to generate the beep function in javascript
same goes for messageboxes == alert
xavier
Admin
Also, why didnt he use RequiredFieldValidation controls.... :o
BEEP
Admin
I've seen this before, but with a MessageBox instead of a beep. Honest.
Admin
Err...
If lblError is a label control (which the name implies) then this code will work and will simply show an additional text field, in this case showing the error message, on the served web-page.
Just "In case you're not versed in ASP.NET" :)