473,387 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

best way to display categories on a .aspx page

Hello,

I need to display a list of categories on the left side of a page, and
I am confused how I would do this using a List Control (as appose to
weaving my own HTML on the server side).

My HTML should look like:

<ul>

<li><a href="">Category</a>
<ul>
<li><a href="">Sub Category 1</a></li>
<li><a href="">Sub Category 2</a></li>
</ul>
</li>
<li><a href="">Category2</a>
<ul>
<li><a href="">Sub Category 1</a></li>
</ul>
</li>

</ul>

To make things complicated, maybe I want to ONLY show the top level
categories (Category, Category2). I also might want to highlight the
currently selected category.

If it was up to me, I would just do this using a StringBuilder in the
codebehind, but one of my requirements is that it has to be easy for
the web designers to go in and change the HTML markup.
Dec 21 '07 #1
2 1797
Liz

"DotNetNewbie" <sn***********@yahoo.comwrote in message
news:9b**********************************@d21g2000 prf.googlegroups.com...

I need to display a list of categories on the left side of a page, and
I am confused how I would do this using a List Control (as appose to
weaving my own HTML on the server side).
Have you considered using a Repeater control? It'll let you use pretty much
whatever template you need to output the HTML; I should think the design
people could do most or all of what they need to with CSS

My HTML should look like:

<ul>

<li><a href="">Category</a>
<ul>
<li><a href="">Sub Category 1</a></li>
<li><a href="">Sub Category 2</a></li>
</ul>
</li>
<li><a href="">Category2</a>
<ul>
<li><a href="">Sub Category 1</a></li>
</ul>
</li>

</ul>

To make things complicated, maybe I want to ONLY show the top level
categories (Category, Category2). I also might want to highlight the
currently selected category.

If it was up to me, I would just do this using a StringBuilder in the
codebehind, but one of my requirements is that it has to be easy for
the web designers to go in and change the HTML markup.


Dec 22 '07 #2
On Dec 21, 7:06*pm, "Liz" <l...@tiredofspam.comwrote:
"DotNetNewbie" <snowman908...@yahoo.comwrote in message

news:9b**********************************@d21g2000 prf.googlegroups.com...
I need to display a list of categories on the left side of a page, and
I am confused how I would do this using a List Control (as appose to
weaving my own HTML on the server side).

Have you considered using a Repeater control? *It'll let you use pretty much
whatever template you need to output the HTML; *I should think the design
people could do most or all of what they need to with CSS
My HTML should look like:
<ul>
<li><a href="">Category</a>
* * <ul>
* * * * * * <li><a href="">Sub Category 1</a></li>
* * * * * * <li><a href="">Sub Category 2</a></li>
* * </ul>
*</li>
*<li><a href="">Category2</a>
* * *<ul>
* * * * * * *<li><a href="">Sub Category 1</a></li>
* * *</ul>
*</li>
</ul>
To make things complicated, maybe I want to ONLY show the top level
categories (Category, Category2). *I also might want to highlight the
currently selected category.
If it was up to me, I would just do this using a StringBuilder in the
codebehind, but one of my requirements is that it has to be easy for
the web designers to go in and change the HTML markup.- Hide quoted text-

- Show quoted text -
The problem is, how can I show an embedded repeater inside the
repeater? (and it might be n levels, like subcategories of the top
level category, but the sub categories could also have sub-sub
categories).
Dec 23 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brian Murphy | last post by:
I have a php-based yahoo-like web directory.I wanna give webmasters the possiblity to integrate my whole directory in their websites with their own formatting.I wanna this inclusion to be possible...
0
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
18
by: Terry Holland | last post by:
I have an asp.net (1.1) application that connects to a SQL server 2000 db. I have a stored procedure in my db that out puts data in xml format. What I need to be able to do is display that xml...
1
by: kennedystephen | last post by:
I have a .NET web service which returns a System.XML.XMLDocument. The data returned in the XML is just simple text. Now, I want to display and format the text on a .aspx web page. I know how to...
3
by: AG | last post by:
Below is code (slightly modified and converted to VB) that was provided to me in response to another post. I am using it to demonstrate another problem. In order for paging and other features to...
2
by: kbutterly | last post by:
All, I have a menu which contains Category as the master and Product as the child. When I click on a Category in the menu, I want one formView control, fvpc, to show, and then when I click on...
4
by: jsd219 | last post by:
I am a newbie for sure; problem, I have a page that has dynamically generated sections at the top, when I click on one of the sections I would like the list of categories associated with the...
5
by: vajra1987 | last post by:
Hello everybody I am working on a Website built on JSP and Servlets . one of the features of the site is to give user the chance to subscribe to different newsletters under different categories. ...
0
by: AlDave | last post by:
What I'm trying display is after the user chooses the product (1st category) from a dropdown, then the dataview will display; The category any reports under that subcategory any...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.