@@@@@@新手web问题,请大虾帮忙@@@@@@@@@@@@@@@@
<%@ Import Namespace="system.data" %><%@ Import Namespace="system.data.oledb"%>
<script language="vb" runat="server">
Sub enter_click(ByVal sende As Object, ByVal e As EventArgs)
Dim conn As New OleDbConnection("provider=microsoft.jet.oledb.4.0; data source=" & Server.MapPath("dat/new.mdb"))
Dim cmd As New OleDbCommand("select * from news", conn)
Dim adp As New OleDbDataAdapter(cmd)
Dim ds As New DataSet()
adp.Fill(ds, "inf")
datagrid1.DataSource = ds.Tables("inf").DefaultView
datagrid1.DataBind()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>显示 </title>
</head>
<body>
<h4>信息显示 </h4>
<asp:DataGrid ID ="datagrid1" Width ="100%" HeaderStyle-BackColor ="#bcbcbc" runat ="server"/>
</body>
</html>
我在vs2005上的提示是没有错误.为IE浏览器不能数据库里的信息. --------------------编程问答--------------------
帮顶
,单步调试吧
补充:.NET技术 , .NET Framework