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?
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?
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
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>
Become Part of This Conversation
Join NowFor Free!