ListView Row Color chnage when mouse hover in ASP.Net

  • ListView Row Color chnage when mouse hover in ASP.Net

    for further details and related topics http://www.codecorner.somee.com/
  • 1 Comment sorted by
  •  

    Set Row attribute of list view during design time like that red color code which i highlight

     








    ">


    ">


    ">


    ">


    ">


    " enabled="false">







    <body> <form id="form1" runat="server"> <div> <asp:ListView ID="ListView1" runat="server" DataKeyNames="CounterID" DataSourceID="SqlDataSource1" > <ItemTemplate> <tr style="background-color:#DCDCDC;color: #000000;" onmouseover="this.style.backgroundColor='Gray';" onmouseout="this.style.backgroundColor='White';"> <td> <asp:Label ID="SnoLabel" runat="server" Text='<%# Eval("Sno") %>' /> </td> <td> <asp:Label ID="CounterIDLabel" runat="server" Text='<%# Eval("CounterID") %>' /> </td> <td> <asp:Label ID="CounterNameLabel" runat="server" Text='<%# Eval("CounterName") %>' /> </td> <td> <asp:Label ID="CreateDateLabel" runat="server" Text='<%# Eval("CreateDate") %>' /> </td> <td> <asp:Label ID="LastModifiedLabel" runat="server" Text='<%# Eval("LastModified") %>' /> </td> <td> <asp:CheckBox ID="StatusCheckBox" runat="server" Checked='<%# Eval("Status") %>' Enabled="false" /> </td> </tr> </ItemTemplate> <LayoutTemplate> <table runat="server"> <tr runat="server"> <td runat="server"> <table ID="itemPlaceholderContainer" runat="server" border="0" style=""> <tr runat="server" style=""> <th runat="server"> Sno</th> <th runat="server"> CounterID</th> <th runat="server"> CounterName</th> <th runat="server"> CreateDate</th> <th runat="server"> LastModified</th> <th runat="server"> Status</th> </tr> <tr ID="itemPlaceholder" runat="server"> </tr> </table> </td> </tr> <tr runat="server"> <td runat="server" style=""> <asp:DataPager ID="DataPager1" runat="server"> <Fields> <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" /> <asp:NumericPagerField /> <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" /> </Fields> </asp:DataPager> </td> </tr> </table> </LayoutTemplate> </asp:ListView> <br /> <br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Restaurant_DBConnectionString %>" SelectCommand="SELECT * FROM [CounterNo]"></asp:SqlDataSource> </div> </form></body>























                   






Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative