| | | Forum Member
       
Group: Forum Members Last Login: 9/11/2011 12:23:11 PM Posts: 77, Visits: 335 |
| Can anyone explain the difference between:
[code]
Response.Write("Hello World")
[/code]
vs.
[code]
Document.Write("Hello World")
[/code]
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 |
| | | | Junior Member
       
Group: Forum Members Last Login: 6/8/2011 8:59:02 AM Posts: 19, Visits: 20 |
| Hi
Response.Write is getting executed in Web Server (usually IIS) and is an ASP function which is used to write to response stream from asp.
document.write is javascript function which will be executed on the client side once it reaches the browser.
Thanks,
Paul daniel
.NET Application Development | C# Development |
| | | | Supreme Being
       
Group: Forum Members Last Login: 9/6/2011 8:13:12 PM Posts: 216, Visits: 156 |
| 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.
Destroyer |
| |
|
|