Click here to Skip to main content
15,891,828 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Panel Control Pin
Brij11-Oct-10 22:05
mentorBrij11-Oct-10 22:05 
AnswerRe: Panel Control Pin
Tej Aj12-Oct-10 21:35
Tej Aj12-Oct-10 21:35 
QuestionAUTOCOMPLETE Pin
padmanabhan N11-Oct-10 20:37
padmanabhan N11-Oct-10 20:37 
AnswerRe: AUTOCOMPLETE Pin
Pete O'Hanlon11-Oct-10 23:57
mvePete O'Hanlon11-Oct-10 23:57 
AnswerRe: AUTOCOMPLETE Pin
Steve Echols13-Oct-10 7:05
Steve Echols13-Oct-10 7:05 
GeneralRe: AUTOCOMPLETE Pin
padmanabhan N14-Oct-10 0:20
padmanabhan N14-Oct-10 0:20 
GeneralRe: AUTOCOMPLETE Pin
Steve Echols14-Oct-10 16:46
Steve Echols14-Oct-10 16:46 
QuestionDataPager with ListView Pin
Łukasz Nowakowski11-Oct-10 3:48
Łukasz Nowakowski11-Oct-10 3:48 
Let's say I have a ListView with DataPager like this:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="List.ascx.cs" Inherits="Lnow.Applications.CompanyManagement.Gui.Clients.List" %>
<asp:ListView runat="server" ID="itemsList" ItemPlaceholderID="item">
    <LayoutTemplate>
        <table class="simpleList">
            <thead>
                <tr>
                    <td>
                        <asp:Literal runat="server" Text="[Id]" meta:resourcekey="Id" />
                    </td>
                    <td>
                        <asp:Literal runat="server" Text="[Name]" meta:resourcekey="Name" />
                    </td>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <td colspan="2">
                        <asp:DataPager runat="server" ID="itemsPager" PagedControlID="itemsList" PageSize="5">
                            <Fields>
                                <asp:NumericPagerField />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </tfoot>
            <tbody>
                <asp:PlaceHolder runat="server" ID="item" />
            </tbody>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr class="row">
            <td>
                <%# DataBinder.Eval(Container.DataItem, "Id") %>
            </td>
            <td>
                <%# DataBinder.Eval(Container.DataItem, "Name") %>
            </td>
        </tr>
    </ItemTemplate>
    <AlternatingItemTemplate>
        <tr class="row-alt">
            <td>
                <%# DataBinder.Eval(Container.DataItem, "Id") %>
            </td>
            <td>
                <%# DataBinder.Eval(Container.DataItem, "Name") %>
            </td>
        </tr>
    </AlternatingItemTemplate>
</asp:ListView>

Now I want to use DataPager to page search results. How do I do it?
I found two answers to this question, both have an issue I want to avoid:
1. Create method to support ListView's PagePropertiesChanging event.
2. Create method to support DataPager's PreRender event.
The issue, that I want to avoid is that both those methods require me to store collection of retrieved data somewhere. And I don't want to do it, cause I can't do it. Objects, that are bound don't have Serializable attribute, so I can't throw them into ViewState. Is there any other way to do this? Or do I have to create my own control for paging?
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.

QuestionPrinting question Pin
Abrojus11-Oct-10 2:56
Abrojus11-Oct-10 2:56 
QuestionMerge between VB & C# [modified] Pin
Abdullah S. Abdelhay11-Oct-10 1:53
Abdullah S. Abdelhay11-Oct-10 1:53 
AnswerRe: Merge between VB & C# Pin
Brij11-Oct-10 2:40
mentorBrij11-Oct-10 2:40 
AnswerRe: Merge between VB & C# Pin
Abhijit Jana11-Oct-10 7:59
professionalAbhijit Jana11-Oct-10 7:59 
GeneralRe: Merge between VB & C# [WORKED] Pin
Abdullah S. Abdelhay12-Oct-10 23:59
Abdullah S. Abdelhay12-Oct-10 23:59 
AnswerRe: Merge between VB & C# (WORKED) [modified] Pin
Abdullah S. Abdelhay11-Oct-10 23:11
Abdullah S. Abdelhay11-Oct-10 23:11 
GeneralRe: Merge between VB & C# (WORKED) Pin
Ankur\m/12-Oct-10 21:50
professionalAnkur\m/12-Oct-10 21:50 
Questionexception handling in BLL? Pin
srisairam10-Oct-10 21:13
srisairam10-Oct-10 21:13 
AnswerRe: exception handling in BLL? Pin
Eduard Keilholz10-Oct-10 21:27
Eduard Keilholz10-Oct-10 21:27 
GeneralRe: exception handling in BLL? Pin
srisairam11-Oct-10 0:01
srisairam11-Oct-10 0:01 
AnswerRe: exception handling in BLL? Pin
Not Active11-Oct-10 2:42
mentorNot Active11-Oct-10 2:42 
QuestionDate control in Dropdownlist Pin
Dineshrai200910-Oct-10 21:07
Dineshrai200910-Oct-10 21:07 
AnswerRe: Date control in Dropdownlist Pin
Brij11-Oct-10 0:50
mentorBrij11-Oct-10 0:50 
GeneralRe: Date control in Dropdownlist Pin
Dineshrai200911-Oct-10 21:23
Dineshrai200911-Oct-10 21:23 
AnswerRe: Date control in Dropdownlist Pin
Sneha Bisht11-Oct-10 23:00
Sneha Bisht11-Oct-10 23:00 
GeneralRe: Date control in Dropdownlist Pin
Ravi Sant3-May-11 0:21
Ravi Sant3-May-11 0:21 
QuestionEditable GridView Pin
treuveni10-Oct-10 4:23
treuveni10-Oct-10 4:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.