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

📄 admin.aspx

📁 .net的一个很经典很普通的实例
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin.aspx.cs" Inherits="admin_admin" MaintainScrollPositionOnPostback="true" %>
<%Response.Buffer = true; Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1); Response.Expires = 0; Response.CacheControl = "no-cache";%>

<!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">
<link rel="shortcut icon" href="/MovieShow/Images/Real-doc.ico" type="image/x-icon" />
    <title>MovieShow--管理</title>
    <script language="javascript" type="text/javascript">
    function pageStart()
    {
    document.getElementById("DIV1").style.display="block";
    document.getElementById("DIV2").style.display="none";
    document.getElementById("DIV3").style.display="none";
    document.getElementById("DIV4").style.display="none";
    }
    function select1()
    {
     document.getElementById("DIV1").style.display="block";
     document.getElementById("DIV2").style.display="none";
     document.getElementById("DIV3").style.display="none";
     document.getElementById("DIV4").style.display="none";
    
    }
    function select2()
    {
     document.getElementById("DIV1").style.display="none";
     document.getElementById("DIV2").style.display="block";
     document.getElementById("DIV3").style.display="none";
     document.getElementById("DIV4").style.display="none";
    
    }
    function select3()
    {
     document.getElementById("DIV1").style.display="none";
     document.getElementById("DIV2").style.display="none";
     document.getElementById("DIV3").style.display="block";
     document.getElementById("DIV4").style.display="none";
    
    }
      function select4()
    {
     document.getElementById("DIV1").style.display="none";
     document.getElementById("DIV2").style.display="none";
     document.getElementById("DIV3").style.display="none";
     document.getElementById("DIV4").style.display="block";
    
    }
    
    </script>
</head>
<body onload="pageStart();">
    <form id="form1" runat="server">
    <div>
        <div style=" background-image:url(/MovieShow/Images/admin.jpg);z-index: 100; left: 0px; width: 344px; position: absolute; top: 132px;
            height: 488px">
            <asp:Label ID="Label1" runat="server" Font-Size="Smaller" Style="z-index: 100; left: 152px;
                position: absolute; top: 44px" Text="Label"></asp:Label>
            <asp:Label ID="Label2" runat="server" Font-Size="Smaller" Style="z-index: 101; left: 152px;
                position: absolute; top: 80px" Text="Label"></asp:Label>
            <asp:HyperLink ID="Link1" runat="server" Font-Size="Smaller" ForeColor="#404040"
                Style="z-index: 102; left: 172px; position: absolute; top: 168px">电影详细信息</asp:HyperLink>
            <asp:HyperLink ID="Link2" runat="server" Font-Size="Smaller" ForeColor="#404040"
                Style="z-index: 103; left: 188px; position: absolute; top: 212px">电影介绍</asp:HyperLink>
            <asp:HyperLink ID="Link3" runat="server" Font-Size="Smaller" ForeColor="#404040"
                Style="z-index: 104; left: 192px; position: absolute; top: 256px">用户信息</asp:HyperLink>
            <asp:HyperLink ID="Link4" runat="server" Font-Size="Smaller" ForeColor="#404040"
                Style="z-index: 105; left: 180px; position: absolute; top: 300px">用户收藏信息</asp:HyperLink>
            &nbsp;
            <asp:LinkButton ID="LinkButton1" runat="server" Font-Size="Smaller" ForeColor="#404040"
                OnClick="LinkButton1_Click" Style="z-index: 107; left: 200px; position: absolute;
                top: 344px">登出</asp:LinkButton>
        </div>
        <div id="DIV1" runat="server" style="font-size: 15px; z-index: 101; left: 360px;
            width: 556px; position: absolute; top: 136px; height: 484px">
            <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateDeleteButton="True"
                AutoGenerateEditButton="True" AutoGenerateInsertButton="True" AutoGenerateRows="False"
                Caption="电影详细信息" CaptionAlign="Top" DataKeyNames="FilmID" DataSourceID="SqlDataSource1"
                EnablePagingCallbacks="True" Height="1px" Style="position: static" Width="556px">
                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" NextPageText="下一页" PageButtonCount="15"
                    PreviousPageText="上一页" />
                <Fields>
                    <asp:BoundField DataField="FilmID" HeaderText="FilmID" InsertVisible="False" ReadOnly="True"
                        SortExpression="FilmID" />
                    <asp:BoundField DataField="FilmName" HeaderText="FilmName" SortExpression="FilmName" />
                    <asp:BoundField DataField="FilmOtherName" HeaderText="FilmOtherName" SortExpression="FilmOtherName" />
                    <asp:BoundField DataField="FilmImageURLB" HeaderText="FilmImageURLB" SortExpression="FilmImageURLB" />
                    <asp:BoundField DataField="FilmDirector" HeaderText="FilmDirector" SortExpression="FilmDirector" />
                    <asp:BoundField DataField="FilmActor" HeaderText="FilmActor" SortExpression="FilmActor" />
                    <asp:BoundField DataField="FilmTime" HeaderText="FilmTime" SortExpression="FilmTime" />
                    <asp:BoundField DataField="FilmHit" HeaderText="FilmHit" SortExpression="FilmHit" />
                    <asp:BoundField DataField="FilmCategory" HeaderText="FilmCategory" SortExpression="FilmCategory" />
                    <asp:BoundField DataField="FilmRegion" HeaderText="FilmRegion" SortExpression="FilmRegion" />
                    <asp:BoundField DataField="FilmPlayTime" HeaderText="FilmPlayTime" SortExpression="FilmPlayTime" />
                    <asp:BoundField DataField="FilmImageURLS" HeaderText="FilmImageURLS" SortExpression="FilmImageURLS" />
                    <asp:BoundField DataField="FilmWeb" HeaderText="FilmWeb" SortExpression="FilmWeb" />
                    <asp:BoundField DataField="PlayURL" HeaderText="PlayURL" SortExpression="PlayURL" />
                </Fields>
            </asp:DetailsView>
        </div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.;Initial Catalog=SqlFilm;Persist Security Info=True;User ID=sa"
            InsertCommand="INSERT INTO Films(FilmID, FilmName, FilmOtherName, FilmImageURLB, FilmDirector, FilmActor, FilmTime, FilmHit, FilmCategory, FilmRegion, FilmPlayTime, FilmImageURLS, FilmWeb, PlayURL) VALUES (,,,,,,,,,,,,,)"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT [FilmID], [FilmName], [FilmOtherName], [FilmImageURLB], [FilmDirector], [FilmActor], [FilmTime], [FilmHit], [FilmCategory], [FilmRegion], [FilmPlayTime], [FilmImageURLS], [FilmWeb], [PlayURL] FROM [Films]"
            UpdateCommand="UPDATE Films SET FilmName =, FilmOtherName =, FilmImageURLB =, FilmDirector =, FilmActor =, FilmTime =, FilmHit =, FilmCategory =, FilmRegion =, FilmPlayTime =, FilmImageURLS =, FilmWeb =, PlayURL =">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="Data Source=.;Initial Catalog=SqlFilm;Persist Security Info=True;User ID=sa"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [Users]"></asp:SqlDataSource>
        <div id="DIV3" runat="server" style="font-size: 15px; z-index: 103; left: 364px;
            width: 100px; position: absolute; top: 140px; height: 100px">
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
                AutoGenerateSelectButton="True" DataKeyNames="UserName,FilmID" DataSourceID="SqlDataSource3"
                EnableViewState="False" Style="position: static" Width="560px">
                <Columns>
                    <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly="True" SortExpression="UserName" />
                    <asp:BoundField DataField="FilmID" HeaderText="FilmID" ReadOnly="True" SortExpression="FilmID" />
                </Columns>
            </asp:GridView>
        </div>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=.;Initial Catalog=SqlFilm;Persist Security Info=True;User ID=sa"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT [FilmDetail] FROM [Films]">
        </asp:SqlDataSource>
        <div id="DIV4" runat="server" style="font-size: 15px; z-index: 104; left: 364px;
            width: 548px; position: absolute; top: 140px; height: 100px">
            <asp:DetailsView ID="DetailsView3" runat="server" AllowPaging="True" AutoGenerateDeleteButton="True"
                AutoGenerateEditButton="True" AutoGenerateInsertButton="True" AutoGenerateRows="False"
                DataKeyNames="UserID" DataSourceID="SqlDataSource4" EnablePagingCallbacks="True"
                Height="50px" Style="position: static" Width="420px">
                <Fields>
                    <asp:BoundField DataField="UserID" HeaderText="UserID" InsertVisible="False" ReadOnly="True"
                        SortExpression="UserID" />
                    <asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" />
                    <asp:BoundField DataField="UserPwd" HeaderText="UserPwd" SortExpression="UserPwd" />
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                    <asp:BoundField DataField="sex" HeaderText="sex" SortExpression="sex" />
                    <asp:BoundField DataField="Constellation" HeaderText="Constellation" SortExpression="Constellation" />
                    <asp:BoundField DataField="CellPhone" HeaderText="CellPhone" SortExpression="CellPhone" />
                    <asp:BoundField DataField="QQ" HeaderText="QQ" SortExpression="QQ" />
                    <asp:BoundField DataField="RoleName" HeaderText="RoleName" SortExpression="RoleName" />
                </Fields>
            </asp:DetailsView>
        </div>
    </div>
        <div id="DIV2" runat="server" style="font-size: 12px; z-index: 102; left: 360px;
            width: 100px; position: absolute; top: 136px; height: 100px">
            <asp:DetailsView ID="DetailsView2" runat="server" AllowPaging="True" AutoGenerateDeleteButton="True"
                AutoGenerateEditButton="True" AutoGenerateInsertButton="True" AutoGenerateRows="False"
                Caption="电影介绍" DataSourceID="SqlDataSource2" EnablePagingCallbacks="True" Height="32px"
                Style="position: static" Width="556px">
                <EditRowStyle Font-Size="X-Small" />
                <Fields>
                    <asp:BoundField DataField="FilmDetail" HeaderText="FilmDetail" SortExpression="FilmDetail" />
                </Fields>
            </asp:DetailsView>
        </div>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="Data Source=.;Initial Catalog=SqlFilm;Persist Security Info=True;User ID=sa"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [Filmfavor]"></asp:SqlDataSource>
    </form>
</body>
</html>

⌨️ 快捷键说明

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