<%@ Import Namespace="SYStem.data" %>
<%@ Import Namespace="system.data.oledb" %>
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
<head ></head>
<body >
<script language="vb" runat="server" >
Dim a
dim b
dim c
Sub page_load()
Dim data1 = Now.Month & Now.Day & Now.Year
Dim connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\web\mbranch\databases\db1.mdb;"
Dim commstr As String = " SELECT imgpath ,hyperlink,text FROM(表1) where (today=" & data1 & ")"
Dim adapter1 = New OleDbDataAdapter(commstr, connstr)
Dim dataset1 As New DataSet()
adapter1.fill(dataset1, "db1")
a = dataset1.Tables(0).Rows(0).Item(0)
b = dataset1.Tables(0).Rows(0).Item(1)
c = dataset1.Tables(0).Rows(0).Item(2)
Response.Write(b)
Response.Write(data1)
Response.Write(a)
TextBox1.DataBind()
End Sub
</script>
<form runat="server" id ="form1">
<h1>
<asp:hyperlink ID="TextBox1" imageurl="<%# a %>" navigateurl="<%# b%> "
runat="server" Text="<%# c%>" ></asp:hyperlink>
</h1>
</form>
<div align="center"></div>
</body>
</html>
自己写的.NET代码,现在发现asp更具实用性,希望有人帮忙给翻译一下……
数据库里就是主键today,还有图片urlItem(0),超连接Item(1)
和说明文字,Item(2)
谢了!!