Response.Write Benefits or Not

Results 1 to 2 of 2

Thread: Response.Write Benefits or Not

  1. #1
    Join Date
    Dec 1969

    Default Response.Write Benefits or Not

    Response.Write vs. HTML with scripting tags is there a big difference in speed between the two. I understand that if you have HTML with scripting tags each time a scripting tag is executed it has to make a trip to IIS. Just looking to see if there is an ambundant amount of CPU time wasted by not doing the Response.Write.<BR><BR>Ex. <BR>&#060;%<BR>intNumber = 11<BR>Response.Write "Your Number is " & intNumber<BR>%&#062;<BR><BR>&#060;%<BR>intNumber = 11<BR>%&#062;<BR>&#060;HTML&#062;<BR>&#060;BODY&#0 62;<BR> Your Number is &#060;% = intNumber %&#062;<BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default response.write

    context switching can be resource intensive for higher traffic sites and is generally discouraged where possible. For low traffic sites, the cost is barely noticable. Out of habit, I personally try to avoid any more context switching then absolutely necessary.<BR><BR>You should also consider modulizing code in such a way as to reduce the amount of context switching. For instance, performing database interactions sandwiched in between HTML can make ASP code hard to support and adjust when new features or changes come along. Putting such code inside of specific subs/functions and call them where applicable makes your code much easier to support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts