Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
C#
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default7.aspx.cs" Inherits="Default7" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function checktrue()
        {
            var x = document.getElementById('<%=DataList1.ClientID%>');
            
        }
    </script>
    
    
</head>
<body>
    <form id="form1" runat="server">
        <div>

            <asp:DataList ID="DataList1" runat="server" OnItemCommand="DataList1_ItemCommand" CellPadding="4" ForeColor="#333333">
                <footerstyle backcolor="#507CD1" font-bold="True" forecolor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderTemplate>
                    <asp:CheckBox ID="chkall" runat="server" onclick="checktrue()"  />
                    EMPID ENAME DESIGNATION DOJ SALARY DEPTNO Edit/Update
                </HeaderTemplate>
                <itemstyle backcolor="#EFF3FB" />
                <itemtemplate>
                    <asp:CheckBox ID="chkone" runat="server" />
                    <asp:Label ID="lblempid" runat="server" Text='<%#Eval("empid") %>' />

                    <%#Eval("ename") %>
                    <%#Eval("desg") %>
                    <%#Eval("doj") %>
                    <%#Eval("salary") %>
                    <%#Eval("deptno") %>
                    <asp:Button ID="btnedit" runat="server" Text="EDIT" CommandName="Edit" />
                </itemtemplate>
                <alternatingitemstyle backcolor="White" />
                <edititemtemplate>
                    <asp:Label ID="lblempid" runat="server" Text='<%#Eval("empid") %>' />
                    <asp:TextBox ID="txtename" runat="server" Text='<%#Eval("ename") %>' />
                    <asp:TextBox ID="txtdesg" runat="server" Text='<%#Eval("desg") %>' />
                    <asp:TextBox ID="txtdoj" runat="server" Text='<%#Eval("doj") %>' />
                    <asp:TextBox ID="txtsalary" runat="server" Text='<%#Eval("salary") %>' />
                    <asp:TextBox ID="txtdeptno" runat="server" Text='<%#Eval("deptno") %>' />
                    <asp:Button ID="btnupdate" runat="server" Text="Update" CommandName="Update" />
                    <asp:Button ID="btncancel" runat="server" Text="Cancel" CommandName="Cancel" />
                </edititemtemplate>
                <footertemplate>
                    <asp:Button ID="btmdelete" runat="server" OnClick="btndelete_Click" Text="Delete" />

                    <asp:TextBox ID="txtempid" runat="server" Width="60">
                    <asp:TextBox ID="txtename" runat="server" Width="60">
                    <asp:TextBox ID="txtdesg" runat="server" Width="60">
                    <asp:TextBox ID="txtdoj" runat="server" Width="60">
                    <asp:TextBox ID="txtsalary" runat="server" Width="60">
                    <asp:TextBox ID="txtdeptno" runat="server" Width="60">
                    <asp:Button ID="btnadd" runat="server" Text="add" CommandArgument="add" />
                </footertemplate>

                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />

            

            <br />

        </div>
    </form>
</body>
</html>
Posted
Updated 18-Jun-14 22:47pm
v2
Comments
Thanks7872 19-Jun-14 4:48am    
Please use google for such issues. Please.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900