Results 1 to 2 of 2

Thread: Image

  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: Image

    Hi,

    I want to make sure between HTML and ASP. Most of the HTML codes can be used in the ASP, right. The only different is the syntax, and ASP can support database, and ASP is running in the server.


    In HTML,
    <img src="boat.gif" alt="Big Boat">

    In ASP,
    Response.write("<img src='boat.gif' alt='Big Boat'>")

    For the above HTML and ASP examples
    Is it correct?

    Please let me know, thanks.

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191
    HTML is markup language. ASP is a server side programming language. There are no similarities. When you do response.write as you have done, you are just using asp to write html to the browser.

    You CAN mix both html and asp on an asp page. So there is no need to do the response.write as you have done, unless there is some reason you want or need to do it that way.

    Personally, I always double up on my quotes instead of using the single quotes. So for me, I would do...

    Response.write "<img src=""boat.gif"" alt=""Big Boat"">"
    Last edited by MrWizard; 03-28-06 at 20:51.
    Tim

Posting Permissions

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