A1VBCode Forums

Response.Write vs. Document.Write


http://www.a1vbcode.com/vbforums/Topic28590.aspx

By daveofgv - 12/28/2009

Can anyone explain the difference between:





Response.Write("Hello World")





vs.





Document.Write("Hello World")





Also, why would you use those when you can just place a label on the page and use the label text property to fill in what you want????



Thanks in advanced



daveofgv
By Destroyer - 12/29/2009

If it's a simple task such as popping an alert box it's best to use client side javascript, ie. Document.write because it's quicker and you won't be using any web server resources. General rule is if it can be accomplished on the client then only use client side script.