mckenzie Posted February 2, 2006 Share Posted February 2, 2006 i've heard you can put into a database a symbol within the text and then implement a loop to insert a pic from the database when it finds the symbol. something like dim textarray, maxrecordtextarray = split(rs("bodytext"), "*/")maxrecord = ubound(textarray)if maxrecord >= i then Response.write "<p>" & replace(textarray(i), vbcrlf, "<br>") & "</p>" end if%>How will i be able to implement this into my code?heres my code<%'create a connection objectdim connset conn = server.CreateObject ("ADODB.connection")Conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="& server.mappath("WildlifeMag.mdb")&";"'create a recordsetDim SQLSQL = "select * from features where ID=" & request("id") & " order by ID"set RS = Conn.execute(SQL)%><html><head><title>New Page 1</title></head><body bgcolor="#FFFFCC"><table border="0" width="780" cellspacing="0" cellpadding="0" height="476"> <tr> <td colspan="3" valign="top" width="774" height="89"><!--#include virtual="/cmpweb10/mckenzie/includes/masthead.asp"--></td> </tr> <tr> <td colspan="3" width="774" height="1"></td> </tr> <tr> <td width="194" valign="top" height="442"><!--#include virtual="/cmpweb10/mckenzie/includes/leftnav.asp"--></td><!--end nav bar--> <td width="482" valign="top" align="center" height="442"> <td width="565" valign="top"> <table width="564" height ="390" border="0" cellpadding ="10" cellspacing="0"> <tr> <td colspan="2" align="center" class="style3">click on any thumbnail image to see the larger version</td> </tr> <tr> <% dim i i=1 do while not RS.eof%> <td align="center"><p><a href="/featureview.asp?ID=<%=RS("ID")%>"><img border="0" src="/cmpweb10/mckenzie/images/<%=RS("image1") %>"width="80" height="57"></a></p> <%=RS("Main Body")%> <% RS.movenext i = i+1 if i > 2 then response.Write "</td><td>" i=1 end if loop%> </tr> </table></td> </td> <td width="90" valign="top" height="442"><!--#include virtual="/cmpweb10/mckenzie/includes/rightbar.asp"--></td></tr></table></body></html> Link to comment Share on other sites More sharing options...
aspnetguy Posted February 2, 2006 Share Posted February 2, 2006 where id you hear this??? I don't understand what you are asking.If you read it on a website please provide link so I know what you are talking about. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now