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

📄 myaccount.aspx

📁 online book store working project
💻 ASPX
字号:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="System.data.SqlClient" %>
<%@ Import Namespace="System.data" %>
<script runat="server">
    Dim sqlcon As New SqlConnection
    Dim sqlcmd As New SqlCommand

    Protected Sub bt_login_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If Page.IsValid Then
            Dim MyAddress As String
            Dim sqlcon As SqlConnection
            Dim MyPass As SqlCommand
            Dim MySQL As String
            Dim MyRs As String
            Dim MyCount As SqlCommand
            Dim IntUserCount As Integer
            
            Dim strpassword As String
            If Request.QueryString("ReturnUrl") = "" Then
                MyAddress = "userhome.aspx"
            Else
                MyAddress = Request.QueryString("ReturnUrl")
            End If
            sqlcon = New SqlConnection("Data Source=.; database =BookStore;Integrated Security=True")
            MySQL = "SELECT COUNT(*) FROM tbCustomer_Detail WHERE CustomerId like '" & username.Text & "'"
            MyRs = "SELECT CustomerPass FROM tbCustomer_Detail Where CustomerId like '" & username.Text & "'"
            MyCount = New SqlCommand(MySQL, sqlcon)
            MyPass = New SqlCommand(MyRs, sqlcon)
            sqlcon.Open()
            IntUserCount = MyCount.ExecuteScalar()
            strpassword = MyPass.ExecuteScalar()
                       
            sqlcon.Close()
            
            If (username.Text = "" Or userpass.Text = "") Then
                MsgBox("Either User ID OR Password is not entered", MsgBoxStyle.Information, "User id required")
                
            ElseIf IntUserCount > 0 Then
                
                If userpass.Text.Trim = strpassword.Trim Then
                    'MsgBox("strpasword" + strpassword.ToString)
                    FormsAuthentication.SetAuthCookie(username.Text, True)
                    Session("username") = username.Text
                    Response.Redirect("userhome.aspx")
                                      
                Else
                    MsgBox("Invalid Password...", MsgBoxStyle.Information, "Invalid Password")
                End If
            Else
                MsgBox("Invalid Username...", MsgBoxStyle.Information, "Invalid UserName")
            End If
        Else
      
            Exit Sub
        End If
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Book Store</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<form id="form1" runat ="server"><div id="wrap">

       <div class="header">
       		<div class="logo"><a href="index.aspx"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>            
        <div id="menu">
            <ul>                                                                       
            <li><a href="index.aspx">home</a></li>
            <li><a href="about.html">about us</a></li>
            <li><a href="category.html">books</a></li>
            <li><a href="specials.html">specials books</a></li>
            <li class="selected"><a href="myaccount.aspx">my accout</a></li>
            <li><a href="register.aspx">register</a></li>
            <li><a href="details.html">prices</a></li>
            <li><a href="contact.aspx">contact</a></li>
            </ul>
        </div>     
            
            
       </div> 
       
       
       <div class="center_content">
       	<div class="left_content">
            <div class="title"><span class="title_icon"><img src="images/bullet1.gif" alt="" title="" /></span>My account</div>
        
        	<div class="feat_prod_box_details">
            <p class="details">
             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.
            </p>
            
              	<div class="contact_form">
                <div class="form_subtitle">login into your account</div>
                      <table style="width: 67px">
                      
                          <tr>
                              <td>
                                  <strong>Username:</strong></td>
                              <td>
                        <asp:TextBox ID="username" runat="server" Width="224px"></asp:TextBox></td>
                          </tr>
                          <tr>
                              <td><strong>Password:</strong></td>
                              <td><asp:TextBox ID="userpass" runat="server" Width="225px"></asp:TextBox></td>
                          </tr>
                          <tr>
                              <td>
                              </td>
                              <td>
                                  <asp:LinkButton ID="LinkButton1" runat="server">Forgot Password?</asp:LinkButton></td>
                          </tr>
                          <tr>
                              <td>
                              </td>
                              <td>
                                  <asp:Button ID="bt_login" runat="server" OnClick="bt_login_Click" Text="Login" /></td>
                          </tr>
                          <tr>
                              
                              <td style="text-align: right">&nbsp;</td>
                          </tr>
                           <tr><td colspan="2" style="text-align: center"></td>
                               </tr>   </table>  </div>	
            
        <div class="clear"></div>
        </div><!--end of left content--><div class="right_content">
        
                	<div class="languages_box">
            <span class="red">Languages:</span>
            <a href="#"><img src="images/gb.gif" alt="" title="" border="0" /></a>
            <a href="#"><img src="images/fr.gif" alt="" title="" border="0" /></a>
            <a href="#"><img src="images/de.gif" alt="" title="" border="0" /></a>
            </div>
                <div class="currency">
                <span class="red">Currency: </span>
                <a href="#">GBP</a>
                <a href="#">EUR</a>
                <a href="#"><strong>USD</strong></a>
                </div>
                
                
              <div class="cart">
                  <div class="title"><span class="title_icon"><img src="images/cart.gif" alt="" title="" /></span>My cart</div>
                  <div class="home_cart_content">
                  3 x items | <span class="red">TOTAL: 100$</span>
                  </div>
                  <a href="cart.html" class="view_cart">view cart</a>
              
              </div>
        
             <div class="title"><span class="title_icon"><img src="images/bullet3.gif" alt="" title="" /></span>About Our Store</div> 
             <div class="about">
             <p>
             <img src="images/about.gif" alt="" title="" class="right" />
             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.
             </p>
             
             </div>
             
             <div class="right_box">
             
             	<div class="title"><span class="title_icon"><img src="images/bullet4.gif" alt="" title="" /></span>Promotions</div> 
                    <div class="new_prod_box">
                        <a href="details.html">product name</a>
                        <div class="new_prod_bg">
                        <span class="new_icon"><img src="images/promo_icon.gif" alt="" title="" /></span>
                        <a href="details.html"><img src="images/thumb1.gif" alt="" title="" class="thumb" border="0" /></a>
                        </div>           
                    </div>
                    
                    <div class="new_prod_box">
                        <a href="details.html">product name</a>
                        <div class="new_prod_bg">
                        <span class="new_icon"><img src="images/promo_icon.gif" alt="" title="" /></span>
                        <a href="details.html"><img src="images/thumb2.gif" alt="" title="" class="thumb" border="0" /></a>
                        </div>           
                    </div>                    
                    
                    <div class="new_prod_box">
                        <a href="details.html">product name</a>
                        <div class="new_prod_bg">
                        <span class="new_icon"><img src="images/promo_icon.gif" alt="" title="" /></span>
                        <a href="details.html"><img src="images/thumb3.gif" alt="" title="" class="thumb" border="0" /></a>
                        </div>           
                    </div>               
             
             </div>
             
             <div class="right_box">
             
             	<div class="title"><span class="title_icon"><img src="images/bullet5.gif" alt="" title="" /></span>Categories</div> 
                
                <ul class="list">
                <li><a href="#">accesories</a></li>
                <li><a href="#">books gifts</a></li>
                <li><a href="#">specials</a></li>
                <li><a href="#">hollidays gifts</a></li>
                <li><a href="#">accesories</a></li>
                <li><a href="#">books gifts</a></li>
                <li><a href="#">specials</a></li>
                <li><a href="#">hollidays gifts</a></li>
                <li><a href="#">accesories</a></li>
                <li><a href="#">books gifts</a></li>
                <li><a href="#">specials</a></li>                                              
                </ul>
                
             	<div class="title"><span class="title_icon"><img src="images/bullet6.gif" alt="" title="" /></span>Partners</div> 
                
                <ul class="list">
                <li><a href="#">accesories</a></li>
                <li><a href="#">books gifts</a></li>
                <li><a href="#">specials</a></li>
                <li><a href="#">hollidays gifts</a></li>
                <li><a href="#">accesories</a></li>
                <li><a href="#">books gifts</a></li>
                <li><a href="#">specials</a></li>
                <li><a href="#">hollidays gifts</a></li>
                <li><a href="#">accesories</a></li>                              
                </ul>      
             
             </div>         
             
        
        </div><!--end of right content-->
        
        
       
       
       <div class="clear"></div>
       </div><!--end of center content--><div class="footer">
       	<div class="left_footer"><img src="images/footer_logo.gif" alt="" title="" /><br /> <a href="http://csscreme.com/freecsstemplates/" title="free templates"><img src="images/csscreme.gif" alt="free templates" title="free templates" border="0" /></a></div>
        <div class="right_footer">
        <a href="#">home</a>
        <a href="#">about us</a>
        <a href="#">services</a>
        <a href="#">privacy policy</a>
        <a href="#">contact us</a>
       
        </div>
        
       
       </div>
    

</div></form>

</body>
</html>

⌨️ 快捷键说明

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