I used your code in my application to restrict no of records per page. It is working fine, thanks.<BR><BR>But the server is generating error if there are no records in the database matching the search criteria. If records are there, it is fine, but if it is not, error. How can I fix it?<BR><BR>Please help.<BR>Thanks<BR>Arvind