|
-
Nov 28th, 2007, 12:30 PM
#1
Thread Starter
Addicted Member
Response.Write
I love Response.Write with all my heart.
I always hear this....
"wahhhh, you should not use response.write, wahhhh"
Response.Write rocks man! You can make cool javascript and ajax pages without having to worry about learning any new technology.
Noone ever really says why you should not use Response.Write, they just repeat what other folks say. lol, kind of like Hollywood when it comes to politics. Right now, I'm reapeting something I heard in the movie..
Team America, World Police
-
Nov 28th, 2007, 01:44 PM
#2
Re: Response.Write
Response.Write is a great debugging tool, but it's not good practice on a live site.
-
Nov 28th, 2007, 02:39 PM
#3
Fanatic Member
Re: Response.Write
Response.Slap("ILMV")
That should be a new... thingy... thing... um... SHUT UP!!
-
Nov 29th, 2007, 03:34 AM
#4
Re: Response.Write
You haven't provided a compelling reason to use it, either, you've just said it's cool, which is more or less an appeal to ignorance.
-
Nov 29th, 2007, 05:47 AM
#5
Re: Response.Write
 Originally Posted by silentthread
I love Response.Write with all my heart.
I always hear this....
"wahhhh, you should not use response.write, wahhhh"
Response.Write rocks man! You can make cool javascript and ajax pages without having to worry about learning any new technology.
Noone ever really says why you should not use Response.Write, they just repeat what other folks say. lol, kind of like Hollywood when it comes to politics. Right now, I'm reapeting something I heard in the movie..
Team America, World Police
Using Response.Write is bad. Using Response.Write to write javascript is worse. Using Response.Write to write "cool" AJAX is shameful, something I'd never admit to in public.
The reason is, Response.Write occurs when the response stream is being sent and so the output can be sent at any point in the page rather than when it should be sent. If you create a script block of a function you've made, it's always best to use Page.RegisterClientScript (or its equivalent) so that the script is output to the correct place in the page. Incorrect placement of scripts (hence, Response.Write) can cause problems especially when you're working with the DOM. ASP.NET when used correctly effectively negates the purpose of Response.Write.
-
Nov 29th, 2007, 10:31 AM
#6
Thread Starter
Addicted Member
Re: Response.Write
***puts on a grocery bag on head, and walks away in shame***
-
Nov 29th, 2007, 12:08 PM
#7
Fanatic Member
Re: Response.Write
 Originally Posted by mendhak
Using Response.Write is bad. Using Response.Write to write javascript is worse. Using Response.Write to write "cool" AJAX is shameful, something I'd never admit to in public.
The reason is, Response.Write occurs when the response stream is being sent and so the output can be sent at any point in the page rather than when it should be sent. If you create a script block of a function you've made, it's always best to use Page.RegisterClientScript (or its equivalent) so that the script is output to the correct place in the page. Incorrect placement of scripts (hence, Response.Write) can cause problems especially when you're working with the DOM. ASP.NET when used correctly effectively negates the purpose of Response.Write.
I was taught to use Response.Write for vbscript code. Thanks for that mendhak.
-
Dec 1st, 2007, 01:07 PM
#8
-
Dec 1st, 2007, 02:34 PM
#9
My usual boring signature: Something
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|