ciao,
Sto usando un database access
nel campo testo completo della news scrivo l'interna news, ma quando inserisco un link ad un sito, questo quando rileggo la news non mi appare cliccabile.
come faccio a renderlo cliccabile all'interno dell'intero testo?
ecco il codice:
dove il campo newsbody è il testo intero della news
<%
id = request("id")
if id < 1 then
response.write (errormsg)
response.end
end if
Set dConn = Server.CreateObject("ADODB.Connection")
dConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & database_path
'========================================
if request.form("ispostback") = 1 then
set updateRS = Server.CreateObject("ADODB.RecordSet")
updateSQL = "SELECT * from tblnews where ID = " & ID & ";"
updateRS.Open updateSQL,dConn, 1,3
urecordcount = updateRS.recordcount
if urecordcount <> 1 then
updateRS.Close
Set updateRS = Nothing
response.redirect("default.asp?norecord")
end if
updateRS("newsdate") = checkdate(request.form("newsdate"))
updateRS("expire") = checkdate(request.form("expire"))
updateRS("newstitle") = Presubmit2(request.form("newstitle"))
updateRS("newsbody") = Presubmit2(request.form("newsbody"))
updateRS("newsimage") = Presubmit2(request.form("newsimage"))
updateRS("link") = Presubmit2(request.form("link"))
updateRS("active") = request.form("active")
updateRS.update
updateRS.Close
set updateRS = Nothing
message = "
<font color='#FF0000'>Update Successful</font></p>"
end if
'========================================
strSQL = "SELECT expire, id, newsdate, newstitle, newsbody, newsimage, link, active from tblnews where ID = " & ID & ";"
Set newsRS = Server.CreateObject("ADODB.recordset")
newsRS.Open strSQL, dConn, 1, 3
recordcount = newsrs.recordcount
if recordcount < 1 then
newsRS.close
set newsRS = nothing
dConn.close
set dConn = nothing
response.write (errormsg)
Response.end
end if
For fnum = 0 To newsRS.Fields.Count-1
execute(newsRS.Fields(fnum).Name & " = newsRS(" & CHR(34) & newsRS.Fields(fnum).Name & CHR(34) & ")")
Next
if newsbody <> "" then
newsbody = undo(newsbody)
end if
%>
<table body bgcolor="F5F5F5" border=0 bordercolor="#CCCCFF" CELLSPACING=2 CELLPADDING=0>
<%
' Loop through the records (second dimension of the array)
response.write "<tr>" & _
"<td>" & newsdate & "</td>" & _
"<td>" & newstitle & " </td>" & _
"</tr>" & _
"<tr>" & _
"<td> <img src= "& newsimage & " width=""150"" height=""125""> </td>" & _
"<td>" & newsbody & "</td>" & _
"<td>" & link & "</td>" & _
"</tr>" & _
"<tr>" & _
"<td></td>" & _
"<td></td>" & _
"</tr>"
response.write ("<meta name=""description"" content= """ & (newsbody) & """/>")
%>
grazie

Rispondi quotando

