I have a have a table with Region_Name, Region_ID fields, and another one with Area_Name, Region_ID fields (each region have Areas that belongs to it). I want to display on my asp.net page a list of links (something that looks like a treeView) so when someone clicks on for ex The Bronx from Region New York in this list:
-
New York
-
The Bronx
-
Brooklyn
-
Manhattan
-
-
Kentucky
-
Ashland
-
Bardstown
-
-
New Jersey
-
Essex
-
Middlesex
-
etc….etc… So, apart from the basics, i want to know how to populate the above list Automatically and make sure that the results are ALL Links, in other words, New York is a link, The Bronx is a link, and all the elements in the list are links that i will later attach a queryString to…
I am using VB.Net and ASP.Net 3.5. Thanks in advance
Thanks for all who answered or attempted to. I found out a different yet easy solution:
In my page_load i called:
labelwhatever.text = outputRegionAsLinks()
and the function is:
This way i can avoid the overload of creating asp link buttons or hyperlinks, and directly inject html tags in my form, and also tailor the links as i wish them to be.