Difference between response.write and <%=%>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nudrat
    New Member
    • Aug 2007
    • 38

    Difference between response.write and <%=%>

    can nebody tell me which of the following is better over other and how?
    Difference between response.write and <%=%>
    both of these statement will return same output.

    Thanks & Regards
    Nudrat
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Nudrat,

    There is no difference, <%=%> is just a shortened syntax for response.write. I find whether I use one or the other is more a question of the circumstance. If I am in the middle of a block of code and want to write something I use response.write. If I am in the middle of HTML code and want to insert data from the script I use <%=%>

    Jared

    Comment

    • nudrat
      New Member
      • Aug 2007
      • 38

      #3
      Thanx a lot Jared,

      Regards
      Nudrat

      Originally posted by jhardman
      Nudrat,

      There is no difference, <%=%> is just a shortened syntax for response.write. I find whether I use one or the other is more a question of the circumstance. If I am in the middle of a block of code and want to write something I use response.write. If I am in the middle of HTML code and want to insert data from the script I use <%=%>

      Jared

      Comment

      Working...