ASP.NET MVC ListBox - Footer Templates

  • Alfreds FutterkisteALFKI
  • Antonio Moreno TaqueríaANATR
  • Berglunds snabbköpANTON
  • Around the HornAROUT
  • Berglunds snabbköpBERGS
  • Blauer See DelikatessenBLAUS
  • Blondesddsl père et filsBLONP
  • Bólido Comidas preparadasBOLID
  • Bon app'BONAP
  • Bottom-Dollar MarketsBOTTM
  • B's BeveragesBSBEV
  • Cactus Comidas para llevarCACTU
  • Centro comercial MoctezumaCENTC
  • Chop-suey ChineseCHOPS
  • Comércio MineiroCOMMI
Displaying 15 items.


The ListBox provides a way to customize the footer of the list with items, by using the FooterTemplate property. You can embed any content inside the footer template, including HTML markup and ASP.NET MVC controls (any control from the Obout MVC Suite may be added to a footer template).
View - Aspx

    <% Html.Obout(new ListBox("ListBox1")
    {
        FooterTemplate = new OboutMvcTemplate<ListBoxFooterTemplateContainerInfo>((data) =>
            {%>
                Displaying <%= data.ItemsCount %> items.
            <%})
    }); %>
    
View - Razor

    @Html.Obout(new ListBox("ListBox1")
    {
        FooterTemplate = new OboutMvcTemplate<ListBoxFooterTemplateContainerInfo>(
            @:Displaying @(item.ItemsCount) items.
        )
    })