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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bit of basic asp code assistance

Status
Not open for further replies.

obaluba

Technical User
Sep 24, 2001
49
GB
Hello, i'm just a beginner in the world of ASP i have managed to link an access database and have the results displayed in an asp file.
What i would like to ve able to do is:
- have the hyperlinks as clickable hyperlinks instead of text
- e-mail links to be displayed as actual mailto: links if this is possible
- how do you change the output font to say tahoma in size 10? as its in times new roman
- I wanted to put jpeg images into the microsoft access table, i set the data type as an 'ole object' but i dont get any output?

i pasted the code below

<% Response.buffer = true %>
<html>
<head>
<title>gallery</title>
</head>
<body>
<% Dim rs
Set rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)
rs.Open &quot;mk4&quot;, &quot;DSN=mk4&quot;

While Not rs.EOF
Response.Write &quot;ID : &quot; & rs(&quot;Username&quot;) & &quot;<br>&quot;
Response.Write &quot;First Name : &quot; & rs(&quot;Name&quot;) & &quot;<br>&quot;
Response.Write &quot;e-mail : &quot; & rs(&quot;e-mail&quot;) & &quot;<br>&quot;
Response.Write &quot;URL : &quot; & rs(&quot;URL&quot;) & &quot;<br>&quot;
Response.Write &quot;Location : &quot; & rs(&quot;Location&quot;) & &quot;<br>&quot;
Response.Write &quot;Modifications : &quot; & rs(&quot;Modifications&quot;) & &quot;<br>&quot;
Response.Write &quot;images : &quot; & rs(&quot;images&quot;) & &quot;<br>&quot;
Response.Write &quot;<br>&quot;
rs.MoveNext
Wend

rs.Close
Set rs = Nothing %>
</body>
</html>

thanks for any help in advance - it is greatly appreciated!!

 
Hello,
your questions are more html-related then asp-related, but anyway here's some help :)

- have the hyperlinks as clickable hyperlinks instead of text

a hyperlink is formed as followed:
<a href=&quot; here</a>
for your code this would make:
Response.Write &quot;URL : <a href=&quot;&quot;&quot; & rs(&quot;URL&quot;) & &quot;&quot;&quot;>&quot; & rs(&quot;URL&quot;) & &quot;</a><br>&quot;


- e-mail links to be displayed as actual mailto: links if this is possible

same as above but the href is now &quot;mailto:email&quot;

Response.Write &quot;e-mail : <a href=&quot;&quot;mailto:&quot; & rs(&quot;e-mail&quot;) & &quot;&quot;&quot;>&quot; & rs(&quot;e-mail&quot;) & &quot;<br>&quot;

- how do you change the output font to say tahoma in size 10? as its in times new roman

you'll need to declare a style somewhere. I suggest you do that in the body tag:

<body style=&quot;font-family: &quot;MS Sans Serif&quot;; font-size:10pt&quot;>

I'm not sure if tahoma is a standard font. But you could try it out...

- I wanted to put jpeg images into the microsoft access table, i set the data type as an 'ole object' but i dont get any output?

I'm not sure if that is possible in MS Access. Another way of handling things is to store the relative path to the image file in the database as a string value, for example &quot;images/mypicture.jpg&quot;
You need to store the image somewhere on the webserver in that case.

to get output:
Response.Write &quot;images : <img src=&quot;&quot;&quot; & rs(&quot;images&quot;) & &quot;&quot;&quot; border=&quot;&quot;0&quot;&quot;><br>&quot;

greetings
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top