<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> <!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>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" AutoGenerateSelectButton="True" CellPadding="4" DataKeyNames="emp_Id" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None"> <RowStyle BackColor="#FFFBD6" ForeColor="#333333" /> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="emp_Id" HeaderText="emp_Id" InsertVisible="False" ReadOnly="True" SortExpression="emp_Id" /> <asp:BoundField DataField="emp_name" HeaderText="emp_name" SortExpression="emp_name" /> <asp:BoundField DataField="father_name" HeaderText="father_name" SortExpression="father_name" /> <asp:BoundField DataField="age" HeaderText="age" SortExpression="age" /> <asp:BoundField DataField="sex" HeaderText="sex" SortExpression="sex" /> <asp:BoundField DataField="dob" HeaderText="dob" SortExpression="dob" /> <asp:BoundField DataField="nationality" HeaderText="nationality" SortExpression="nationality" /> <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" /> <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" /> <asp:BoundField DataField="mobile_no" HeaderText="mobile_no" SortExpression="mobile_no" /> <asp:BoundField DataField="exp" HeaderText="exp" SortExpression="exp" /> <asp:BoundField DataField="qual" HeaderText="qual" SortExpression="qual" /> <asp:BoundField DataField="emp_sal" HeaderText="emp_sal" SortExpression="emp_sal" /> <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" /> </Columns> <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" /> <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ABCConnectionString2 %>" SelectCommand="SELECT * FROM [emp_details]" DeleteCommand= "delete from emp_details where emp_name='" + DropDownList1.SelectedItem.Text + "' "> </asp:SqlDataSource> </div> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)