If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Image

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-27-06, 02:30
accessman2 accessman2 is offline
Registered User
 
Join Date: Sep 2005
Posts: 313
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.
Reply With Quote
  #2 (permalink)  
Old 03-28-06, 19:48
MrWizard MrWizard is offline
Registered User
 
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"">"
__________________
Tim

Last edited by MrWizard; 03-28-06 at 19:51.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On