Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8879307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:55:20+00:00 2026-06-14T19:55:20+00:00

I had my design like this which is in a user control as <table>

  • 0

I had my design like this which is in a user control as

<table>
    <tr>
        <td>
            <asp:DataList ID="dlimgShowCase" runat="server" RepeatDirection="Horizontal" EnableViewState="true">
                <ItemTemplate>
                    <asp:Image ID="imgCatalog" runat="server" Height="292" Width="454" ImageUrl='<%# Eval("path") %>' />
                </ItemTemplate>
            </asp:DataList>
        </td>
    </tr>
    <tr>
        <td>
            <asp:DataList ID="dlPaging" runat="server" class="more_pages_navigation" RepeatDirection="Horizontal"
                Width="100" OnItemCommand="dlPaging_ItemCommand" OnItemDataBound="dlPaging_ItemDataBound"
                EnableViewState="true">
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="lnkbtnPaging" runat="server" CommandArgument='<%# Eval("PageIndex") %>'
                            CommandName="Paging" Text='<%# Eval("PageText") %>' Style="text-align: center"
                            OnClick="lnkbtnPaging_Click">   </asp:LinkButton>
                    </li>
                </ItemTemplate>
            </asp:DataList>
        </td>
    </tr>
</table>

and my C# Code is

 if (!IsPostBack)
        {
            BindDataItems();              
        }    



 /// <summary>
    /// Binding Images List
    /// </summary>
    private void BindDataItems()
    {
        // If the DataSource Tables are greater than 1            
        try
        {

            if (Cache["DataShowcaseImages"] == null)
                Cache["DataShowcaseImages"] = DataSource.Tables[0];

            objPagedDataSourceCatalogList.DataSource = ((DataTable)(Cache["DataShowcaseImages"])).DefaultView;
            objPagedDataSourceCatalogList.AllowPaging = true;
            objPagedDataSourceCatalogList.PageSize = PageSize;
            objPagedDataSourceCatalogList.CurrentPageIndex = CurrentPage;
            ViewState["TotalPages"] = objPagedDataSourceCatalogList.PageCount;
            dlimgShowCase.DataSource = objPagedDataSourceCatalogList;
            dlimgShowCase.DataBind();
            performPaging();  // This method bind my second grid,, with page numbers
        }
        catch (Exception)
        {

            throw;
        }


    }

and my paging itemcommand event is

 protected void dlPaging_ItemCommand(object source, DataListCommandEventArgs e)
    {
        if (e.CommandName.Equals("Paging"))
        {
            CurrentPage = Convert.ToInt16(e.CommandArgument.ToString());
            BindDataItems();
        }
    }

But i dont know why the hell the item command event is not raising? Could anyone help me out in this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:55:21+00:00Added an answer on June 14, 2026 at 7:55 pm

    Perhaps you are not assigning the actual DataSource to DataList, use this piece of code instead:

    objPagedDataSourceCatalogList.DataSource = ((DataTable)(Cache["DataShowcaseImages"])).DefaultView;
    objPagedDataSourceCatalogList.AllowPaging = true;
    objPagedDataSourceCatalogList.PageSize = PageSize;
    objPagedDataSourceCatalogList.CurrentPageIndex = CurrentPage;
    ViewState["TotalPages"] = objPagedDataSourceCatalogList.PageCount;
    dlimgShowCase.DataSource = objPagedDataSourceCatalogList.DataSource;
    dlimgShowCase.DataBind();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The thing is this, in Android 1.5 and 1.6 we had the Icon Design
I came across this problem via a colleague today. He had a design for
I had databinding set up like this: ItemsSource={Binding Source={my:Enumeration {x:Type credit:OccupationCategory}}} DisplayMemberPath=Description SelectedValue={Binding EmplType}
Note: This might seem like a Super User question at first, but please read
Originally I had a design problem where I needed five subclasses of a superclass,
Recently I attended a lecture concerning some design patterns: The following code had been
I'm trying to design a Windows Forms application. By default, .NET had put Tahome
I've just had a nagging question for a while regarding iPhone app user interfaces.
I had asked this question in a much more long-winded way a few days
I'm trying to wrap my head around RESTful design, and I'd like to understand

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.