Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I am trying to implement this article .. Click Me in a UserControl. I downloaded the sample attached there and its working fine but i am trying to create UserControl out of it. No rows are getting loaded on scrolling down. I modified the code to look like this..

XML
var lastProductId = $("#<%=Test1.GridView1.ClientID %> tr:last").children("td:first").html();
            //get last table row in order to append the new products
            var lastRow = $("#<%=Test1.GridView1.ClientID %> tr:last");


AND,

C#
function GetRowsCount() {
        //Count no. of rows except header row in the grid.
        var rowCount = $('#<%=Test1.GridView1.ClientID %> tr').length - 1;
        return rowCount;


Its giving me error: The name 'Test1' does not exist in the current context.
Test1 is the Id of my USerControl. Test1 is the ID of UserControl.
Posted
Updated 12-Apr-13 22:07pm
v2

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