Contact Form

Name

Email *

Message *

Jquery Data table using Listview with Paging and search (client side) in asp.net

No comments

 <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>  
 <!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></title>  
   <link href="jqury/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />  
 </head>  
 <body>  
 <form id="form1" action="UserRegistration.html" runat="server">  
   <asp:ListView ID="lstfinance" runat="server" >  
   <LayoutTemplate>  
       <table id="example" class="display" cellspacing="0" width="100%">  
       <thead>  
       <tr>  
         <th>Region</th>  
         <th>Zone</th>  
         <th>Territory</th>  
         <th>E-Code</th>  
         <th>Employee</th>  
         <th>Category</th>  
         <th>Product</th>  
         <th>PackSize</th>  
         <th>SaleQty</th>  
         <th>Rate</th>  
         <th>IncentiveValue</th>   
       </tr>  
       </thead>  
       <tfoot>  
       <tr>  
         <th>Region</th>  
         <th>Zone</th>  
         <th>Territory</th>  
         <th>E-Code</th>  
         <th>Employee</th>  
         <th>Category</th>  
         <th>Product</th>  
         <th>PackSize</th>  
         <th>SaleQty</th>  
         <th>Rate</th>  
         <th>IncentiveValue</th>   
       </tr>  
       </tfoot>  
        <tbody>  
             <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>  
           </tbody>  
       </table>  
     </LayoutTemplate>  
  <ItemTemplate>  
       <tr>  
         <td><%# Eval("RegionName")%></td>  
         <td><%# Eval("ZoneName")%></td>  
         <td><%# Eval("TerritoryName")%></td>  
         <td><%# Eval("FileNo")%></td>  
         <td><%# Eval("EmployeeName")%></td>  
         <td><%# Eval("Categorydesc")%></td>  
         <td><%# Eval("Productname")%></td>  
         <td><%# Eval("Specdesc")%></td>  
         <td><%# Eval("SaleQty")%></td>  
         <td><%# Eval("IncentiveRate")%></td>  
         <td><%# Eval("IncentiveValue")%></td>  
       </tr>  
     </ItemTemplate>  
   </asp:ListView>  
 </form>  
 <script src="jqury/jquery-1.11.3.min.js" type="text/javascript"></script>  
   <script src="jqury/jquery.dataTables.min.js" type="text/javascript"></script>  
   <script type="text/javascript">  
    $(document).ready(function () {  
      $('#example').DataTable();  
         });  
 </script>  
 </body>  
 </html>  

1:  Imports System.Data  
2:  Imports System.Data.SqlClient  
3:  Partial Class Default2  
4:    Inherits System.Web.UI.Page  
5:    Protected Sub form1_Load(sender As Object, e As System.EventArgs) Handles form1.Load  
6:     Dim objCommon As New clsCommon  
7:     Dim qryMain As String  
8:     qryMain = "exec LoadProductWithSaleEmp '','','',''"  
9:     Dim dt As DataTable = objCommon.GetDataTable(qryMain)  
10:     lstfinance.DataSource = dt  
11:     lstfinance.DataBind()  
12:    End Sub  
13:  End Class  

No comments :

Post a Comment