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

📄 userfavor.aspx

📁 .net的一个很经典很普通的实例
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="userfavor.aspx.cs" Inherits="userfavor" %>
<%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>
</head>
<script language="javascript" type="text/javascript">
function select1()
{

 document.getElementById("div2").style.display="block";
}
function select2()
{
 document.getElementById("div2").style.display="none";
}
function safe()
{
 if(document.getElementById("TextBox1").value=="")
  alert("请输入密码!");
 else if((document.getElementById("TextBox2").value)!=(document.getElementById("TextBox1").value)) 
  alert("两次密码输入不一致!");
  else
  {
   var txt1=document.getElementById("TextBox1").value;
   
   //var txt2=document.getElementById("TextBox2").value;
   var txt3=document.getElementById("TextBox3").value;
   var txt4=document.getElementById("TextBox5").value;
   var txt5=document.getElementById("TextBox6").value;
   var context=document.getElementById("Label7");
   var arg="safe|"+txt1+"|"+txt3+"|"+txt4+"|"+txt5;
   context.innerHTML= "<IMG SRC='/MovieShow/Images/pie.gif' />Loading...";
   
   <%= ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context")%>;
   
  }
}
 function ReceiveServerData(result, context) 
        { 
            context.innerHTML =result;
        }
</script>
<body>
    <form id="form1" runat="server">
           <div  style=" width:820px; height:150px;left: 108px; top: 4px; z-index: 101; position: absolute;" >
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="820" height="150">
    <param name="movie" value="/MovieShow/Navigation/Head.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <embed src="/MovieShow/Navigation/Head.swf" width="820" height="150" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
  </object>
</div>
    <div>
        <div id="div1" style=" background-image:url(/MovieShow/Images/userfavor.jpg);z-index: 102; left: 188px; width: 764px; position: absolute; top: 156px;
            height: 496px">
            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/scj.gif" Style="z-index: 100;
                left: 56px; position: absolute; top: 192px" />
            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/Images/info.gif" Style="z-index: 101;
                left: 56px; position: absolute; top: 292px" />
           
            <asp:Label ID="Label1" runat="server" Style="z-index: 102; left: 260px; position: absolute;
                top: 112px" Text="新密码:"></asp:Label>
            <asp:Label ID="Label2" runat="server" Style="z-index: 103; left: 244px; position: absolute;
                top: 148px" Text="重复密码:"></asp:Label>
            <asp:Label ID="Label3" runat="server" Style="z-index: 104; left: 268px; position: absolute;
                top: 184px" Text="Email:"></asp:Label>
            &nbsp;
            <asp:Label ID="Label5" runat="server" Style="z-index: 106; left: 276px; position: absolute;
                top: 220px" Text="电话:"></asp:Label>
            <asp:Label ID="Label6" runat="server" Style="z-index: 107; left: 288px; position: absolute;
                top: 252px" Text="qq:" Height="8px" Width="1px"></asp:Label>
            <asp:TextBox ID="TextBox1" runat="server" Style="z-index: 108; left: 336px; position: absolute;
                top: 108px" TextMode="Password"></asp:TextBox>
            <asp:TextBox ID="TextBox2" runat="server" Style="z-index: 109; left: 336px; position: absolute;
                top: 144px" TextMode="Password"></asp:TextBox>
            <asp:TextBox ID="TextBox3" runat="server" Style="z-index: 110; left: 336px; position: absolute;
                top: 180px"></asp:TextBox>
            &nbsp;
            <asp:TextBox ID="TextBox5" runat="server" Style="z-index: 112; left: 336px; position: absolute;
                top: 216px"></asp:TextBox>
            <asp:TextBox ID="TextBox6" runat="server" Style="z-index: 113; left: 336px; position: absolute;
                top: 252px"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Style="z-index: 114; left: 284px; position: absolute;
                top: 316px" Text="提交" Width="40px" />
            <asp:Label ID="Label7" runat="server" Style="z-index: 116; left: 340px; position: absolute;
                top: 320px"></asp:Label>
        </div>
     <div id="div2" style=" background-image:url(/MovieShow/Images/userfavor1.jpg); z-index: 108; left: 422px; width: 424px; position: absolute; top: 160px;
                height: 480px">
         <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
             AutoGenerateColumns="False" CellPadding="4"
             ForeColor="#333333" GridLines="None" Height="1px" PageSize="15" Style="z-index: 100;
             left: 8px; position: absolute; top: 56px" Width="408px" OnRowCreated="GridView1_RowCreated" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting" ShowFooter="True">
             <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" Font-Size="Small" Height="5px" />
             <Columns>
                 <asp:TemplateField HeaderText="电影名称">
                     <ItemTemplate>
                         <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "FilmDetails.aspx?FilmID="+DataBinder.Eval(Container.DataItem,"FilmID") %>'
                             Style="position: static" Text='<%# DataBinder.Eval(Container.DataItem,"FilmName") %>'></asp:HyperLink>
                     </ItemTemplate>
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="上映时间">
                     <ItemTemplate>
                         <asp:Label ID="Label4" runat="server" Style="position: static" Text='<%# DataBinder.Eval(Container.DataItem,"FilmTime") %>'></asp:Label>
                     </ItemTemplate>
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="电影序号">
                     <ItemTemplate>
                         <asp:Label ID="Label8" runat="server" Style="position: static" Text='<%# DataBinder.Eval(Container.DataItem,"FilmID") %>'></asp:Label>
                     </ItemTemplate>
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="删除" ShowHeader="False">
                     <ItemTemplate>
                         <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"FilmID") %>'
                             Text="删除"></asp:LinkButton>
                     </ItemTemplate>
                 </asp:TemplateField>
             </Columns>
             <RowStyle BackColor="#F7F6F3" ForeColor="#333333" Font-Size="Smaller" HorizontalAlign="Center" />
             <EditRowStyle BackColor="#999999" />
             <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
             <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
             <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="WhiteSmoke" Font-Size="Small" Height="5px" VerticalAlign="Top" Width="5px" />
             <AlternatingRowStyle BackColor="White" ForeColor="#284775" Height="5px" />
             <PagerSettings Visible="False" />
             <EmptyDataTemplate>
                 &nbsp; &nbsp;<br />
                 &nbsp; &nbsp; &nbsp;
                 <asp:Label ID="Label9" runat="server" Style="position: static" Text="您还没有收藏电影!"></asp:Label>
             </EmptyDataTemplate>
         </asp:GridView>
            </div>
        <div style=" background-image:url(/MovieShow/Images/foot.jpg);z-index: 109; left: 0px; width: 156px; position: absolute; top: 496px;
            height: 172px">
        </div>
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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