<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="ip_block.aspx.cs" Inherits="Vote.Admin.ip_block" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="alert alert-danger">
        IP黑名单，在此黑名单里的IP将无法投票。
    </div>
   
    

    <div class="form-inline">
         输入IP
    <asp:TextBox ID="txt_ip" CssClass="form-control" runat="server"></asp:TextBox>

    <asp:RequiredFieldValidator ControlToValidate="txt_ip" ID="RequiredFieldValidator1" runat="server" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>


     <asp:Button ID="Button1" runat="server" Text="添加" CssClass="btn btn-primary" OnClick="Button1_Click" />
  </div>
      <br />
     <br />



    <asp:GridView ID="GridView1"    
        AutoGenerateDeleteButton="true"        
         GridLines="None"
           
         CssClass="table"    
         DataSourceID="SqlDataSource1" 
        DataKeyNames="id" 
        AllowPaging="true" 
        PageSize="100"
         runat="server">

       
    </asp:GridView>



    <asp:SqlDataSource ID="SqlDataSource1"  
          DeleteCommand="delete from vote_ip_block where id=@id"
         SelectCommand=" select ID, IP from vote_ip_block order by id desc "
         ConnectionString="<%$ConnectionStrings:ConnectionString %>"
         runat="server"></asp:SqlDataSource>





</asp:Content>
