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

  • Home
  • SEARCH
  • 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 6011895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:19:31+00:00 2026-05-23T02:19:31+00:00

In Asp.net website i work with(on which i had no prior knowledge) there is

  • 0

In Asp.net website i work with(on which i had no prior knowledge) there is repeater and html markup. The output i get is spaghetti code mixture of databinded code and also markup after the repeater. The Code Behind and Markup is given below

<ul>
    <li>
    <a name="products">  Products</a>
        <asp:Repeater ID="RT_Category" runat="server">
        <ItemTemplate>                                   
        <%# DataBinder.Eval(Container.DataItem, "Category")%>                          
        <asp:Repeater ID="RT_SubCategory" runat="server" DataSource='<%# DataBinder.Eval(Container.DataItem, "SubCat") %>'>
        <HeaderTemplate><ul class="test1"></HeaderTemplate>
        <ItemTemplate>
        <li><a href='<%# DataBinder.Eval(Container.DataItem, "LinkS") %>'><%# DataBinder.Eval(Container.DataItem, "SubcatName")%></a></li>
        </ItemTemplate>
        <FooterTemplate></FooterTemplate>
        </asp:Repeater>         
        </ItemTemplate>
        </asp:Repeater>
    </li>
</ul>

<ul id="mega">
    <li><a href="#">SCHOOLS</a>
        <div> 
            <h2>Classes</h2>
            <p><a href="#">Times</a><a href="#">Schedual</a><a href="#">Map</a></p>
            <p><a href="#">Names</a><a href="#">Study</a><a href="#">Directions</a></p>
            <p><a href="#">Health</a><a href="#">Dance</a><a href="#">Biology</a></p>
            <h2>Teachers</h2>
            <p><a href="#">Billy</a><a href="#">Madeleine</a><a href="#">Lauren</a></p>
            <p><a href="#">Paddington</a><a href="#">Stefan</a><a href="#">Michael</a></p>
            <p><a href="#">Shannon</a><a href="#">Mary</a><a href="#">Raffaello</a></p>
            <h2>Location</h2>
            <p><a href="#">Carlsbad</a><a href="#">Oceanside</a><a href="#">El Cajon</a></p>
            <p><a href="#">Vista</a><a href="#">La Costa</a><a href="#">Encinitas</a></p>
            <p><a href="#">San Diego</a><a href="#">Los Angles</a><a href="#">Cardiff</a></p>
            <h2>Months</h2>
            <p><a href="#">Janary</a><a href="#">February</a><a href="#">March</a><a href="#">April</a></p>
            <p><a href="#">May</a><a href="#">June</a><a href="#">July</a><a href="#">August</a></p>
            <p><a href="#">September</a><a href="#">October</a><a href="#">November</a><a href="#">December</a></p>
        </div>
    </li>

Heres whats being output to my browser…

<ul>
    <li class="">
      <a name="products" id="products">Products</a> Designer Corner Groupings

      <div class="test1" style="margin-left: 2em; visibility: hidden">
        Chairs

        <ul class="test1">
          <li><a href="/classicfurniture4u/s/Modern-chairs/PpAqk7vjo8c/s">Modern
          chairs</a></li>

          <li style="list-style: none">Tables

            <ul class="test1">
              <li><a href="/classicfurniture4u/s/Coffee-tables/j0DuY5817sM/s">Coffee
              tables</a></li>
            </ul>

            <ul id="mega">
              <li class="">
                <a href="#">SCHOOLS</a>

                <div style="z-index: 985;">
                  <h2>Classes</h2>

                  <p><a href="#">Times</a><a href="#">Schedual</a><a href="#">Map</a></p>

                  <p><a href="#">Names</a><a href="#">Study</a><a href=
                  "#">Directions</a></p>

                  <p><a href="#">Health</a><a href="#">Dance</a><a href=
                  "#">Biology</a></p>

                  <h2>Teachers</h2>

                  <p><a href="#">Billy</a><a href="#">Madeleine</a><a href=
                  "#">Lauren</a></p>

                  <p><a href="#">Paddington</a><a href="#">Stefan</a><a href=
                  "#">Michael</a></p>

                  <p><a href="#">Shannon</a><a href="#">Mary</a><a href=
                  "#">Raffaello</a></p>

                  <h2>Location</h2>

                  <p><a href="#">Carlsbad</a><a href="#">Oceanside</a><a href="#">El
                  Cajon</a></p>

                  <p><a href="#">Vista</a><a href="#">La Costa</a><a href=
                  "#">Encinitas</a></p>

                  <p><a href="#">San Diego</a><a href="#">Los Angles</a><a href=
                  "#">Cardiff</a></p>

                  <h2>Months</h2>

                  <p><a href="#">Janary</a><a href="#">February</a><a href=
                  "#">March</a><a href="#">April</a></p>

                  <p><a href="#">May</a><a href="#">June</a><a href="#">July</a><a href=
                  "#">August</a></p>

                  <p><a href="#">September</a><a href="#">October</a><a href=
                  "#">November</a><a href="#">December</a></p>
                </div>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </li>
  </ul>
  • 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-23T02:19:32+00:00Added an answer on May 23, 2026 at 2:19 am

    When you’re using a Repeater to build up lists, it’s generally easier to put the <ul> opening and closing tags in the repeater’s header and footer, respectively. So something like this:

    <asp:Repeater ... runat="server">
        <HeaderTemplate>
            <ul>
        </HeaderTemplate>
        <ItemTemplate>
                <li><!-- data binding stuff --></li>
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Any idea on how to get my asp.net mvc website to work on a
I have to ensure the security of a asp.net website at work. They asked
I am using DotNetOpenAuth in my ASP.Net Website. I have modified it to work
I have an ASP.NET website from which the users themselves will generate custom reports
I'm building an ASP.Net website. I have a cart class which stores the items
Currently, I'm maintaining an older ASP.NET website. In the solution, there exists 5 C#
I have an asp.net website which contains a few pages that I'd like to
I want to develop an asp.net website which gets an address as an input
I have an ASP.NET website on a WinServer2k8 machine, which is protetced through Forms
I have a custom configuration file in my asp.net website, named urls.config , which

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.