.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

How could i paginate this?

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
Hi there I'm making a web application with user controls. One of the features that this application is the search. I make the result of the searches dinamically by server code, showing an instance of a user control that is the information from a row of those i want to show. The problem is that when i have many results to display, i need to paginate the results.To display the results i collect data through a datatable and then walk along the rows one by one by calling passing this information to a user control that displays this information on screen, and so on for all rows.The code is as follows:   DAL_Search.SearchDataTable dt = GetInfo(); if (dt.Rows.Count > 0) { foreach (DAL_Search.SearchRow row in dt.Rows) { Control ctrl = new Control(); ctrl = Page.LoadControl("~/Usercontrols/uc_SearchResults.ascx"); Type tp = ctrl.GetType(); if (row.USERNAME != "") { System.Reflection.PropertyInfo propIdUser = tp.GetProperty("IdUser"); propIdUser.SetValue(ctrl, row.ID, null); } else { System.Reflection.PropertyInfo propIdUser = tp.GetProperty("IdGrupo"); propIdUser.SetValue(ctrl, row.ID

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend