ASP VB脚本/ Dreamweaver可点击结果链接

时间:2015-09-13 04:49:37

标签: asp.net vb.net

我正在使用asp VB脚本和Access作为我的数据库在Dreamweaver CS6中构建文档目录。我有一份"文件"具有

属性的表
   -refid (PK) .........(this is an auto#)
   -docname ...........(Description of the doc)
   -location ..............(e.g. "images\Power Point\Smart-Wireless-Overview-16x9.pptx")
   -typeid (FK).......(e.g. Manual, Presentation, Drawing etc)
   -modelcode.........(e.g. 3051S, 3144 etc)

我正在构建一个搜索字段,用户可以在其中输入搜索条件,系统应显示该文档。 我能够设计搜索并获得准确的结果,但是我无法获得用户查看或下载文档的可点击链接。浏览器上显示的所有内容都是存储在数据库中的实际链接。

我有什么方法可以获得用户点击查看文档的链接或图标吗?

------搜索代码------

<h2>Select A Search Criteria</h2>
<div id="search_options">
  <form name="form1" method="post" action="Result.asp">
    <label for="input"></label>
    <input type="text" name="input" id="input">
    <input type="submit" name="search_btn" id="search_btn" value="Submit">
  </form>
</div>


------RESULTS CODE------
 <h2>Content Found</h2>
    <div id="results">Content for  id "results" Goes Here
      <% If Not Search.EOF Or Not Search.BOF Then %>
  <table border="1">
    <tr>
      <td>refid</td>
      <td>docname</td>
      <td>location</td>
      <td>typeid</td>
      <td>modelcode</td>
      <td>Details</td>
    </tr>
    <% While ((Repeat1__numRows <> 0) AND (NOT Search.EOF)) %>
      <tr>
        <td><%=(Search.Fields.Item("refid").Value)%></td>
        <td><%=(Search.Fields.Item("docname").Value)%></td>
        <td><%=(Search.Fields.Item("location").Value)%></td>
        <td><%=(Search.Fields.Item("typeid").Value)%></td>
        <td><%=(Search.Fields.Item("modelcode").Value)%></td>
        <td> <a href="ResultsDetails.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "refid=" & search.Fields.Item("refid").Value%>">View</a></td> 
      </tr>
      <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Search.MoveNext()
Wend
%>
  </table>
  <% End If ' end Not Search.EOF Or NOT Search.BOF %>
    </div>
    </section>



-----DETAILS CODE-----

 <p>Content for  id "results" Goes Here</p>
      <p><img src="images/Data_Sheets/00813-0100-4001.pdf" width="82" height="73" longdesc="<%=(Details.Fields.Item("location").Value)%>"></p>
      <p><%=(Details.Fields.Item("location").Value)%></p>
    </div>
    </section>

0 个答案:

没有答案