#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Posts
    5
    Rep Power
    0

    removing a user from a table


    I am a rookie at programming, please help!! I am trying to remove a user from a table. I do not want to remove the user from the database just from the table we display on our website. Is there a simple way of doing so?
  2. #2
  3. 0x800A0C93
    ASP Super Hero (2500 - 2999 posts)

    Join Date
    Jan 2009
    Location
    Ridin' through this world...
    Posts
    2,975
    Rep Power
    1310
    You don't provide enough info for answer, so I'll just throw something out.

    Instead of:
    select * from users

    do:
    select * from users where username <> 'person you no want'
    Brinkster- free development account. Not affiliated, but I sure like free. Brinkster.com
  4. #3
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Posts
    5
    Rep Power
    0
    Here is the code, however I need someone to view it and explain to me what I'm doing wrong, PLEASE!

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DeleteUsers.aspx.cs" Inherits="SocialEquiptyPrompt.DeleteUsers" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Delete Users</h2>

    <asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False"
    DataSourceID="UsersSource" Width="100%" OnRowCommand="deleteFromAspnetProvider" >
    <Columns>
    <asp:TemplateField ShowHeader="False">
    <ItemTemplate>
    <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return confirm('Are you sure you want to delete this user?');"
    CommandName="Delete" Text="Delete User"></asp:LinkButton>
    </ItemTemplate>
    </asp:TemplateField>
    <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True"
    SortExpression="id" />

    <asp:BoundField DataField="FirstName" HeaderText="FirstName" ReadOnly="True"
    SortExpression="FirstName" />
    <asp:BoundField DataField="LastName" HeaderText="LastName" ReadOnly="True"
    SortExpression="LastName" />
    <asp:BoundField DataField="Username" HeaderText="Username" ReadOnly="True"
    SortExpression="Username" />
    <asp:BoundField DataField="LastLogin" HeaderText="LastLogin" ReadOnly="True"
    SortExpression="LastLogin" />
    <asp:CheckBoxField DataField="Grader" HeaderText="Grader" ReadOnly="True"
    SortExpression="Grader" />
    <asp:CheckBoxField DataField="Admin" HeaderText="Admin" ReadOnly="True"
    SortExpression="Admin" />
    <asp:CheckBoxField DataField="IsPHDStudent" HeaderText="Is PhD Student" ReadOnly="True"
    SortExpression="Admin" />
    </Columns>
    </asp:GridView>

Similar Threads

  1. Removing a subset from a main table
    By jaybee in forum Microsoft Access Help
    Replies: 7
    Last Post: August 4th, 2007, 09:32 PM
  2. Removing Session IDs for User-Agent Bots
    By richard.chavez in forum Programming Help
    Replies: 0
    Last Post: December 26th, 2006, 10:34 AM
  3. Removing single quotes from data in a SQL table
    By gowans007 in forum Microsoft SQL Server
    Replies: 5
    Last Post: May 25th, 2005, 12:54 PM
  4. Calc User Totals Table 1 And Enter In User Records In Table 2
    By OSULLIPA1 in forum Microsoft Access Help
    Replies: 5
    Last Post: November 3rd, 2004, 01:36 AM
  5. Removing Duplicates from a table
    By LeapingLizard in forum Microsoft Access Help
    Replies: 9
    Last Post: August 26th, 2004, 03:00 PM

IMN logo majestic logo threadwatch logo seochat tools logo