![]() |
|
|
|||||||
![]() |
ASP Net - Extracting values from ArrayList |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
AryUnderNav = New ArrayList()
AryUnderNav.Add("Under $50") AryUnderNav.Add("$50 - $100") AryUnderNav.Add("$100 - $200") AryUnderNav.Add("$200 +") UnderNav.DataSource = AryUnderNav UnderNav.DataBind() .... I want to list these items horizontally on the page. What is the syntax to get the value of each Array item? Here is what I've tried to do. <asp <ItemTemplate> {{{{{{{{{{{ I want a URL here with the Index number in the href and the string value as the link text. }}}}}}}}}} </ItemTemplate> </asp Thanks Sonny Sablan Sonny Sablan |
|
|
|
|
#2 |
|
Posts: n/a
|
Just do
<%# Container.DataItem %> Karl -- MY ASP.Net tutorials http://www.openmymind.net/ "Sonny Sablan" <> wrote in message news:... AryUnderNav = New ArrayList() AryUnderNav.Add("Under $50") AryUnderNav.Add("$50 - $100") AryUnderNav.Add("$100 - $200") AryUnderNav.Add("$200 +") UnderNav.DataSource = AryUnderNav UnderNav.DataBind() ... I want to list these items horizontally on the page. What is the syntax to get the value of each Array item? Here is what I've tried to do. <asp <ItemTemplate> {{{{{{{{{{{ I want a URL here with the Index number in the href and the string value as the link text. }}}}}}}}}} </ItemTemplate> </asp Thanks Sonny Sablan Karl Seguin |
|
|
|
#3 |
|
Posts: n/a
|
Thanks... Also, How do I extract the index of the data? And how can I use a datalist that does not write a table? I want to list the items without cells. Sonny *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Sonny Sablan |
|
|
|
#4 |
|
Posts: n/a
|
Sonny:
Try <%# Container.ItemIndex %> but remember that it's 0 based. If you want more control over how your databound controls are created, I suggest you look at the Repeater control which gives you great flexibility. Karl -- MY ASP.Net tutorials http://www.openmymind.net/ "Sonny Sablan" <> wrote in message news:ec$... > > Thanks... > > Also, > > How do I extract the index of the data? > And how can I use a datalist that does not write a table? > > I want to list the items without cells. > > Sonny > > > *** Sent via Developersdex http://www.developersdex.com *** > Don't just participate in USENET...get rewarded for it! Karl Seguin |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cisco QOS MIB values required | manjunatht | Hardware | 1 | 06-13-2008 02:34 PM |
| Values set by javascript are not reflected in serverside(.Net) | rchimakurty | Software | 2 | 11-28-2007 10:07 AM |
| Checkbox values problem in gridview | thanigaimani.thirumalai | Software | 0 | 11-09-2007 05:12 AM |
| Cisco QOS MIB values required | manjunatht | Software | 0 | 09-11-2007 05:40 PM |
| How to make the form View save it's field values in Visual Stdio .NET | asammoud | Software | 0 | 07-17-2007 10:57 AM |