⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.aspx

📁 这是asp.net^和Visual C++Sharp编写的串并口通讯的书籍 源代码
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp;<table style="background-image: url(image/cd_ht_1.jpg); width: 1005px; height: 213px">
            <tr>
                <td style="width: 203px; height: 54px">
                </td>
                <td style="width: 18px; height: 54px">
                </td>
                <td style="width: 189px; height: 54px">
                </td>
                <td style="width: 45px; height: 54px">
                </td>
            </tr>
            <tr>
                <td style="width: 203px; height: 131px">
                </td>
                <td style="width: 18px; height: 131px">
                </td>
                <td style="width: 189px; height: 131px">
                </td>
                <td style="width: 45px; height: 131px">
                </td>
            </tr>
            <tr>
                <td style="width: 203px; height: 109px">
                </td>
                <td style="width: 18px; height: 109px">
                </td>
                <td style="width: 189px; height: 109px">
        <table style="border-left-color: #99ccff; border-bottom-color: #99ccff; width: 506px;
            border-top-style: ridge; border-top-color: #99ccff; border-right-style: ridge;
            border-left-style: ridge; border-right-color: #99ccff; border-bottom-style: ridge">
            <tr>
                <td style="width: 184px; height: 122px; background-image: url(image/02.JPG); border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none;">
                    &nbsp;<fieldset style="width: 240px">
                     <legend class="mainTitle"><span style="font-size: 9pt">通过在控件内编写代码来实现访问Access数据库</span></legend>
                                <asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#E7E7FF"
            BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" Font-Size="9pt" Height="119px" Width="267px">
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <AlternatingRowStyle BackColor="#F7F7F7" />
        </asp:GridView>
                    </fieldset>
                </td>
                <td style="border-left-color: #99ccff; border-bottom-color: #99ccff; width: 100px;
                    border-top-style: solid; border-top-color: #99ccff; border-right-style: solid;
                    border-left-style: solid; border-right-color: #99ccff; border-bottom-style: solid; height: 122px; background-image: url(image/02.JPG);">
                    &nbsp;<fieldset style="width: 240px">
                     <legend class="mainTitle"><span style="font-size: 9pt">通过AccessDataSource数据源控件访问Access数据库</span></legend>
        <asp:GridView ID="GridView2" runat="server" DataSourceID="AccessDataSource1" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="ID" ForeColor="Black" GridLines="None" Font-Size="9pt" Width="280px">
            <FooterStyle BackColor="Tan" />
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                <asp:BoundField DataField="Age" HeaderText="Age" SortExpression="Age" />
                <asp:BoundField DataField="Sex" HeaderText="Sex" SortExpression="Sex" />
            </Columns>
            <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            <AlternatingRowStyle BackColor="PaleGoldenrod" />
        </asp:GridView>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td style="width: 184px">
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="访问Access数据库"
            Width="178px" /></td>
                <td style="width: 100px">
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/User.mdb"
            SelectCommand="SELECT [ID], [Name], [Age], [Sex] FROM [Info]"></asp:AccessDataSource>
                </td>
            </tr>
        </table>
                </td>
                <td style="width: 45px; height: 109px">
                </td>
            </tr>
            <tr>
                <td style="width: 203px; height: 151px">
                </td>
                <td style="width: 18px; height: 151px">
                </td>
                <td style="width: 189px; height: 151px">
                    &nbsp;</td>
                <td style="width: 45px; height: 151px">
                </td>
            </tr>
        </table>
        &nbsp; &nbsp;</div>
        <br />
        &nbsp;<br />
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
        &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -