登录 | 注册 | FAQ
Anonymous

a href in response.write

+ 发表回复

2 篇帖子 分页: 1 / 1


a href in response.write

michelle » 周六 5月 24, 2014 7:04 am

hi i cannot get the url the work in this script what am i doing wrong please

代码: 全选
<html>
<head>
<title>Guestbook</title>
</head>
<body text="#FFFFFF" bgcolor="#000000">

<center><table border="0" width="90%" cellspacing="0" cellpadding="0" bgcolor="#D2D2D2">
      <tr>
         <td valign="top"><div>
            <table border="0" width="100%" cellspacing="0" cellpadding="0">
                                       
                     <tr>
                        <td valign="top" align="left" bgcolor="#000000">
                        
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<%
Dim adoCon          
Dim rsGuestbook         
Dim strSQL   
Dim href
Dim title   

Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("forum.mdb")
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT *, FORMAT(mDATE,'Dddd dd mmmm yyyy') AS fDATE FROM messages order by mDATE desc"

rsGuestbook.Open strSQL, adoCon

href = rsGuestbook("video")
title = "Watch Video"

Do While not rsGuestbook.EOF
Response.write "<tr><td colspan=""5""><br><hr color=""#333333"" size=""3""></td><tr>"
Response.Write "<TR valign=""center""><td valign=""center""><font face=""Calibri"" color=""ffffff"" size=""3"">"  & rsGuestbook("fDATE") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><b><font face=""Calibri"" color=""666666""  size=""4"">" & rsGuestbook("title") & "</a></td></b></tr>"
Response.write "<tr><td valign=""center""><br><font face=""Calibri"" color=""ffffff""  size=""3"">" & rsGuestbook("message") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><font face=""Calibri"" color=""ffffff""  size=""3"">" & rsGuestbook("message2") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><font face=""Calibri"" color=""ffffff""  size=""3"">" & rsGuestbook("message3") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><img src=""" & rsGuestbook("image1") & """  border=""0"" bordercolor=""#000"" width=""33%""><img src=""" & rsGuestbook("image2") & """  border=""0"" bordercolor=""#000"" width=""33%"" ><img src=""" & rsGuestbook("image3") & """  border=""0"" bordercolor=""#000"" width=""33%""></td></tr>" 
Response.write "<tr><td valign=""center""><br><a href='"& href &"'>" & title & "</a></td></tr>"




rsGuestbook.MoveNext


Loop

'Reset server objects
rsGuestbook.Close
Set rsGuestbook = Nothing
Set adoCon = Nothing
%></body></html>
头像

michelle

  • 帖子: 1
  • 注册: 周六 5月 24, 2014 7:02 am

Re: a href in response.write

XainPro » 周二 5月 27, 2014 9:49 am

asp classic is no more supported by Microsoft nor by any one else shit to .net ;)
头像

XainPro

  • 帖子: 3933
  • 注册: 周五 2月 17, 2012 8:10 pm


+ 发表回复

分页: 1 / 1