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 3307692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:26:08+00:00 2026-05-17T21:26:08+00:00

<asp:DataList ID=ItemsList RepeatDirection=Vertical runat=server> <ItemTemplate> <asp:LinkButton ID=SecondLevelItem runat=server CommandName=second OnCommand=SecondLevelItem_Onclick CommandArgument=<%# Container.DataItem %> Text=<%#

  • 0
<asp:DataList ID="ItemsList" RepeatDirection="Vertical" runat="server">            
  <ItemTemplate>                  
        <asp:LinkButton 
            ID="SecondLevelItem" runat="server"  CommandName="second" 
            OnCommand="SecondLevelItem_Onclick" CommandArgument="<%# Container.DataItem %>" 
            Text="<%# Container.DataItem %>" >  
        </asp:LinkButton>                                     
    </ItemTemplate>            
 </asp:DataList>

everything works fine. except that I do not have any control over the styling on the items. I mean I have the styling on the datalist externally but I want to add some spacing (vertically) between each item. How do I do tht? Thanks

  • 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-05-17T21:26:08+00:00Added an answer on May 17, 2026 at 9:26 pm

    In general, to control style, you can apply the <ItemStyle> tag inside the <asp:DataList>.

    You can optionally inject CSS properties into the asp:LinkButton tag, either with the class attribute or directly with style, controlling the height or other CSS properties.

    If it’s applicable, you can still add a
    on the bottom of the template (but this will add a vertical space to the last item too, and I don’t know if you want it).

    Hope to have been of help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<asp:DataList id=ItemsList BorderColor=black CellPadding=5 CellSpacing=5 RepeatDirection=Vertical RepeatLayout=Table RepeatColumns=3 runat=server> <ItemTemplate> <a href=# data-inline=true data-role=button
I have the following itemTemplate in my datalist <ItemTemplate> <asp:LinkButton ID=LinkButton1 CommandName=Select autopostback=True runat=server>'<%#
here i need to replace content says... : <asp:DataList ID=dlProductReviews runat=server RepeatDirection=Vertical RepeatColumns=1> <ItemTemplate>
The DataList: <asp:DataList ID=DataList2 runat=server DataSourceID=AllQuestionsResponded GridLines=Horizontal DataKeyField=ThreadsID onselectedindexchanged=DataList2_SelectedIndexChanged> <ItemTemplate> <asp:LinkButton ID=LinkButton1 runat=server>'<%# Eval(ThreadTitle)
I have a DataList like so: <asp:DataList ID=dlMyList runat=server RepeatColumns=5 RepeatDirection=Horizontal CellSpacing=5 > <ItemTemplate>
I have a datalist <asp:DataList ID=dlstImage runat=server RepeatDirection=Horizontal RepeatColumns=5 CellSpacing=8> <ItemTemplate> <asp:ImageButton ID=Image runat=server
I have a datalist <asp:DataList ID=dlst1 runat=server RepeatDirection=Horizontal RepeatColumns=5 CellSpacing=8> <ItemTemplate> <asp:ImageButton ID=Image runat=server
i have a datalist control <ItemTemplate> <asp:Label ID=lblAddressID runat=server Text='<%# Bind(StudentName) %>'/> <asp:Label ID=lbl
This is my datalist: <asp:DataList ID=DataList1 runat=server DataSourceID=SqlDataSource1 RepeatLayout=Flow> <ItemTemplate> <asp:Label ID=IdLabel runat=server Text='<%#
This my data list: <asp:DataList ID=DataList1 runat=server DataSourceID=SqlDataSource1 RepeatLayout=Flow> <ItemTemplate> Titre: <asp:Label ID=TitreLabel runat=server

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.