你好!请问你有用VB中的ADO和Datagrid控件做的数据库程序,要求有添加、删除、查询、修改功能,发一下
展开全部
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="简单内容显示.ascx.vb" Inherits="简单内容显示" %>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/DB数据库/数据库.ASPX"
SelectCommand="SELECT [编辑姓名], [类别名称], [日期时间], [标题], [副标题], [关键字词], [内容], [图片名称], [类别名称表.ID] AS column1 FROM [内容详细信息] WHERE ([内容数据表.ID] = ?)">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="1" Name="column1" QueryStringField="ID" Type="Int32" />
</SelectParameters>
</asp:AccessDataSource>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="background-color: #cccccc;width:98%">
<tr>
<td style="background-color: #ffffff">
<asp:FormView ID="FormView1" runat="server" DataSourceID="AccessDataSource1" Height="217px"
Width="98%">
<ItemTemplate>
<table align="center" width="98%" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td colspan="4" style="text-align: center; height: 40px;">
<asp:Label ID="标题Label" runat="server" Font-Bold="True" Font-Size="16pt" Text='<%# Bind("标题") %>'></asp:Label>
</td>
</tr>
<tr>
<td colspan="4" style="text-align: center">
<asp:Image ID="Image2" runat="server" ImageUrl="/Images/index_Line.jpg" />
<asp:Label ID="Label1" runat="server" BorderColor="Yellow" ForeColor="Lime" Height="1px"
Width="400px"></asp:Label></td>
</tr>
<tr>
<td colspan="4">
<br />
<asp:Label ID="内容Label" runat="server" Text='<%# Bind("内容") %>'></asp:Label></td>
</tr>
</table>
</ItemTemplate>
<EmptyDataTemplate>
(还没有数据)
</EmptyDataTemplate>
</asp:FormView>
</td>
</tr>
</table>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/DB数据库/数据库.ASPX"
SelectCommand="SELECT [编辑姓名], [类别名称], [日期时间], [标题], [副标题], [关键字词], [内容], [图片名称], [类别名称表.ID] AS column1 FROM [内容详细信息] WHERE ([内容数据表.ID] = ?)">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="1" Name="column1" QueryStringField="ID" Type="Int32" />
</SelectParameters>
</asp:AccessDataSource>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="background-color: #cccccc;width:98%">
<tr>
<td style="background-color: #ffffff">
<asp:FormView ID="FormView1" runat="server" DataSourceID="AccessDataSource1" Height="217px"
Width="98%">
<ItemTemplate>
<table align="center" width="98%" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td colspan="4" style="text-align: center; height: 40px;">
<asp:Label ID="标题Label" runat="server" Font-Bold="True" Font-Size="16pt" Text='<%# Bind("标题") %>'></asp:Label>
</td>
</tr>
<tr>
<td colspan="4" style="text-align: center">
<asp:Image ID="Image2" runat="server" ImageUrl="/Images/index_Line.jpg" />
<asp:Label ID="Label1" runat="server" BorderColor="Yellow" ForeColor="Lime" Height="1px"
Width="400px"></asp:Label></td>
</tr>
<tr>
<td colspan="4">
<br />
<asp:Label ID="内容Label" runat="server" Text='<%# Bind("内容") %>'></asp:Label></td>
</tr>
</table>
</ItemTemplate>
<EmptyDataTemplate>
(还没有数据)
</EmptyDataTemplate>
</asp:FormView>
</td>
</tr>
</table>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询