www.webdeveloper.com
Results 1 to 4 of 4

Thread: Using <% and %> inside a Response.Write

  1. #1
    Join Date
    Nov 2002
    Location
    Norwood, MA
    Posts
    186

    Using <% and %> inside a Response.Write

    Hi all!

    I need to use <% and %> inside a Response.Write... I know there's a simple way to do this, but I can't figure it out or find it elsewhere on the web...

    Help! Thanks!!!

    Natalia

  2. #2
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    hi,
    yes you can't use <%%> within a response.write.

    like this:

    <%
    if bla...bla..bla....

    rsponse.write "This variable <%=variablename%>"

    end if
    %>
    This would generate an error. Instead do this:
    <%
    if bla...bla..bla....

    rsponse.write "This variable "&variablename&""

    end if
    %>
    ----------------------------------

  3. #3
    Join Date
    Dec 2002
    Location
    Pensacola
    Posts
    263
    You could possibly use escape characters?

    In HTML, the percent character is &#37; and in ASP you could use chr(37)
    Cheers!
    Rob

  4. #4
    Join Date
    Nov 2002
    Location
    Norwood, MA
    Posts
    186
    Hi again!

    I actually solved this using Ribeyed's suggestion, but neglected to post my thanks... so: Thanks for the help everyone!!!

    Natalia

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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



Recent Articles