Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placement of ASP into HTML tag

Status
Not open for further replies.

mikemedia

Programmer
Apr 28, 2006
39
US
A friend of mine created a do write.asp file to display recorded mdb data.

Unforunately for me it's straight ASP without any html tag formatting except for <br>.

Conceptually I want to have his lines such as:
Response.Write "DateTime = " & objRS("DateTime")&"<br>"
placed into specified cells, i.e.:

<td>Response.Write.....</td>

Have I given enough info for a response?
 
This isn't the best way to do it but whatever you put within the response.write is written to the browser therefore you can put html tags within this:

Code:
Response.Write "<td>DateTime = " & objRS("DateTime")&"</td>"

Another alternative would be:

Code:
<%
Dim MyDate
MyDate = objRS("DateTime")
%>
<table>
<tr>
<td>DateTime=</td><td><%=MyDate%></td>
</tr>
</table>

Nick
 
You can do that, but you need to what I call "break out" into server side. That is done with the following: "<%".

In your example, a way to put asp code between <td> tags would look like this (I usually space it out):
Code:
<td>
   [!]<%[/!]
      Response.Write "DateTime = " & objRS("DateTime")&"<br>"
   [!]%>[/!]
</td>



[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top