473,799 Members | 3,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="">Categor y</a>
<ul>
<li><a href="">Sub Category 1</a></li>
<li><a href="">Sub Category 2</a></li>
</ul>
</li>
<li><a href="">Categor y2</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 1837
Liz

"DotNetNewb ie" <sn***********@ yahoo.comwrote in message
news:9b******** *************** ***********@d21 g2000prf.google groups.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="">Categor y</a>
<ul>
<li><a href="">Sub Category 1</a></li>
<li><a href="">Sub Category 2</a></li>
</ul>
</li>
<li><a href="">Categor y2</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...@tiredofsp am.comwrote:
"DotNetNewb ie" <snowman908...@ yahoo.comwrote in message

news:9b******** *************** ***********@d21 g2000prf.google groups.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="">Categor y</a>
* * <ul>
* * * * * * <li><a href="">Sub Category 1</a></li>
* * * * * * <li><a href="">Sub Category 2</a></li>
* * </ul>
*</li>
*<li><a href="">Categor y2</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
13484
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 to all kinds of websites (ASP,PHP,... or just HTML).There are basically two files in my website: -index.php : shows the main categories along with 3 sample subcategories. -index1.php : displays the subcategories and sites of categories (exactly...
0
5828
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 which indexes computer magazine articles for personal reference. I am developing a Visual Basic.NET program whose sole purpose is to enter new records into the database. No updates to existing entries, no deletions, and no display
18
3211
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 that I retrieve from my stored proc and display it in a web page formatted as I want. I have managed to get my xml to display as I wish if I manually run my stored proc in QA and copy the xml into notepad and save it as Test.xml. I reference my xsl...
1
1395
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 call the web service from my .aspx by using 'add web resource', but is that the right way to do this? Once I get the XML object back from the web service, what's the best way to format and display it on my .aspx web page? Through XSL/XSLT? Do I use...
3
11722
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 work properly in a gridview, viewstate must be enabled. So, in order to minimize the size of viewstate for a page, I will sometimes turn off viewstate for each control in template columns. That means that the gridview must be databound on each...
2
1915
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 a Product, I want a different formview, fvp, to show. Is it best to have the two forms on separate pages, productView.aspx
4
1562
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 section to display in my left navigation; If I click a different section the current navigation list would be replaced by the categories associated with the new section I clicked on and so on.
5
2048
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. So for example, user1 surfs to the page which displays category sport and under that some options (check boxes) and he can choose zero or more, and he clicks to add the next catetory options , for example entertainement. I am new at Java and...
0
1056
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 reports under that
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10252
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10231
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9073
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.