要做一个投票的网站,需要先登录才能投票,且每个人最多能投一次票,现在找到了一个网站模板,但没有登陆的要求,怎么修改呢,希望大家多多指点,
IIS+access+ASP                                                             真诚感谢。

解决方案 »

  1.   

    会做asp么?加个登录页面,登录成功后信息放session中.
      

  2.   

    估计不会ASP
    要不然就不会这么问
      

  3.   

    投票页面判断Session是否为空,空就跳到登录页面
    if session("username")="" then
    response.redirect("login.asp") 
    end if
      

  4.   

    加个登录页面,用户登录后可用Session来存储登录用户的信息。
    在用户提交投票时先根据Session中的存储的用户ID来从数据库中的投票记录表中判断是否存在记录。
    如存在说明已投过票,提示“您已参与过投票”。
    如不存在,则提交投票记录即可
      

  5.   

    为了防止用户换IP刷投票
    可以用cookie实现
    用户登录就在用户电脑上写入一个登陆的cookie
    保存用户登录信息
    用户投票的时候判断cookie中的值,
    如果没有跳转到登录页面
      

  6.   

    你将登陆验证放到一个asp页面,然后含到需要验证的页面
      

  7.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %><!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>WAMR登录系统</title><script type="text/javascript" language="JavaScript">
    //禁止浏览器后退方法
    javascript:window.history.forward(1);</script><%--    <script type="text/javascript" src="ymPrompt.js"></script>
    --%>    
        <meta http-equiv="Expries" content="0" />
        <meta http-equiv="Cache-Control" content="no-cache" />
        <meta http-equiv="Pragma" content="no-cache" />
        <style type="text/css">
            .styleDiv
            {
                height: 100%;
                border: 0px 0px 0px 0px;
            }
            .styleLeft
            {
                width: 70%;
                text-align: left;
                height: 100%;
            }
            .tdStyle
            {
                text-align: center;
                width: 30px;
                height: 28px;
            }
            .lableStyle
            {
                text-align: center;
            }
            .lblFont
            {
                font-size: 15pt;
                color: #191970;
            }
            .lblFont1
            {
                font-size: 13pt;
                color: #7B68EE;
            }
            .style2
            {
                text-align: center;
                width: 85px;
                height: 28px;
            }
            .imgStyle
            {
                border-bottom: 0px;
                border-right: 0px;
                border-left: 0px;
                border-top: 0px;
            }
            .style3
            {
                width: 85px;
                text-align: center;
            }
            .btnStyle
            {
                text-align: center;
                background-color: #E6E6FA;
                font-size: 13pt;
            }
            .btn-tdStyle
            {
                width: 60%;
            }
            .a_font
            {
                font-size: 11pt;
                color: #7B68EE;
                text-align: center;
            }
            .a_font1
            {
                font-size: 9pt;
            }
        </style>
        
    </head>
    <body>
        <form id="form1" runat="server">
        <div class="styleDiv">
            <img alt="" src="image/top.jpg" style="width: 100%; height: 41px; margin-left: 4px;" />
            <span>
                <img alt="" src="image/WAMR.jpg" style="height: 36px" /></span><a class="lblFont"> 你要的登录界面介绍 </a>
            <table class="styleDiv">
                <tr>
                    <td class="styleLeft">
                        <img alt="登录图片" src="image/登录.jpg" style="width: 100%" />
                    </td>
                    <td>
                        <img alt="" src="image/logintop.jpg" style="width: 100%" />
                        <table>
                            <tr>
                                <td class="style3">
                                    <asp:Label ID="lblUserName" runat="server" CssClass="lblFont1" Text="用户名:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    <asp:Label ID="lblPassWord" runat="server" CssClass="lblFont1" Text="密  码:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtPassWord" runat="server" TextMode="Password"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                        <table>
                                                    <tr>
                                <td class="btn-tdStyle">
                                </td>
                                <td>
                                    <asp:Button ID="btnLogin" runat="server" CssClass="btnStyle" Text="登 录" OnClick="btnLogin_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        </form>
    </body>
    </html>然后自己再添加相应的事件代码