DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Brian Guest

    Using & _ as opposed to with for concatenating Response.

    Does anyone know of any processing benefits to using the (& _ ) to
    concatenate lines in asp as opposed to using (with)?


    For example:


    Response.Write "sdlkfjsdlkfsajd" & _

    "s;lfkjasdlkfsjfklsj" & _

    "s;ldfkjadl;fkjasdljk"



    OR

    With Response

    .Write "sd;lfjd;lfkjasf;lkjsadf"

    .Write "s;lfkjadlfkjasdkfls"

    .Write "s;ldfkjsadlfk"

    End With

    Someone suggested that the object might have to be refrenced with each
    ..write but I thought this was the purpose of using with (refrenced the
    object once and the closed it with the end with)

    Thanks.



  2. #2
    Dan Stillwater Guest

    Re: Using & _ as opposed to with for concatenating Response.


    Hi Brian,

    You might want to check out the following page:
    http://www.asptoday.com/articles/20000113.htm

    It answers your question and gives you many more tips on ASP performance.



    "Brian" <bjoc1@hotmail.com> wrote:
    >Does anyone know of any processing benefits to using the (& _ ) to
    >concatenate lines in asp as opposed to using (with)?
    >
    >
    >For example:
    >
    >
    >Response.Write "sdlkfjsdlkfsajd" & _
    >
    >"s;lfkjasdlkfsjfklsj" & _
    >
    >"s;ldfkjadl;fkjasdljk"
    >
    >
    >
    >OR
    >
    >With Response
    >
    > .Write "sd;lfjd;lfkjasf;lkjsadf"
    >
    > .Write "s;lfkjadlfkjasdkfls"
    >
    > .Write "s;ldfkjsadlfk"
    >
    >End With
    >
    >Someone suggested that the object might have to be refrenced with each
    >..write but I thought this was the purpose of using with (refrenced the
    >object once and the closed it with the end with)
    >
    >Thanks.
    >
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links