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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:27:02+00:00 2026-06-12T14:27:02+00:00

I searched SO and Google for answers so please don’t be upset that I

  • 0

I searched SO and Google for answers so please don’t be upset that I didn’t find what I’m looking for! 🙂

In a HTML page (using ASP .NET 4.5) what type should I be using for a link menu? Basically, I want to have a “Menu” down the left of the page which is populated by a List<string,string> (href,text or something similar), and I don’t know what types to be using in the HTML to allow this.

I’ve found things online which tell me about looping (lol) and other things which are quite obvious, but I can find nothing which tells me “put a <li> tag down and leave it blank, you will put links in it in your pageload” or something similar. I just need to know the frontend type, if you have links with more info then GREAT! But my immediate need is the HTML type to use and the structure it should sit within.

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-06-12T14:27:04+00:00Added an answer on June 12, 2026 at 2:27 pm

    Well, you only have a limited set of html items as choices. A HREF, INPUT TYPE=”BUTTON” or INPUT TYPE=”SUBMIT”.

    Usually menus are implemented with a A tag.

    Of course, some sites simply apply a little onclick javascript goodness to pretty much anything to cause a postback/page load.

    Although you are probably much better served by simply pulling up a site you like and inspecting it’s html.

    Simple output:

    <ul>
      <li><a href="home.aspx">Home</a></li>
      <li><a href="Accounts.aspx">Accounts</a></li>
      <li><a href="Logout.aspx">Log Off</a></li>
    </ul>
    

    In your menu control:

    <asp:Repeater id="MenuRepeater">
      <headertemplate>
        <ul>
      </headertemplate>
      <itemtemplate>
        <li><a href='<%# ((DataRowView)Container.DataItem)["PageFile"]%>'><%# ((DataRowView)Container.DataItem["DisplayName"]%></a></li>
      </itemtemplate>
      <footertemplate>
        </ul>
      </footertemplate>
     </asp:Repeater>
    

    Code Behind:

    protected void Page_Load(object sender, EventArgs e) {
      // have something load a datatable with your page file and display name references  
    
      MenuRepeater.DataSource = GetMenu();
      MenuRepeater.DataBind();
    }
    
    protected void DataTable GetMenu() {
      // you would normally pull this from a database, this is here
      // only to show the idea.
      DataTable menu = new DataTable();
      menu.Columns.Add("PageFile", typeof(String));
      menu.Columns.Add("DisplayName", typeof(String));
    
      DataRow row = menu.NewRow();
      row["PageFile"] = "home.aspx";
      row["DisplayName"] = "Home";
      menu.Rows.Add(row);
    
      row = menu.NewRow();
      row["PageFile"] = "Accounts.aspx";
      row["DisplayName"] = "Accounts";
      menu.Rows.Add(row);
    
      row = menu.NewRow();
      row["PageFile"] = "Logout.aspx";
      row["DisplayName"] = "Logout";
      menu.Rows.Add(row);
    
      return menu;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I searched Google search APIs and didn't find a way to get a website
I searched on Google and Wikipedia a lot, but I could't find answers for
I've searched google and cannot find any answers to the particular problem. I have
I have searched a bit on google, but didn't really found an answer to
Hy there I searched a lot on google, but couldn't find an answer. Maybe
I searched in Google to find the differences between a case class and a
I searched google as much as I could but I couldn't find any good
I have searched through google and SO for possible answers to this question, but
I've searched Google all day and can't find the correct answer to my issue,
I've searched google and reviewed answers on StackOverflow, but cannot seem to resolve this

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.