473,396 Members | 1,734 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,396 software developers and data experts.

How do you create Listings().ListingItems()

OK i know this is a 101 question but...

ASP.NET/VB.NET

ListingItems() as string

I need a nested array of Listings().ListingItems() so i can read a text file
and split each line and insert the results into this array. The read and
split are easy (and so should be setting up this array), but i am banging my
head on how to get my class defined as an array.

Again, end result is Listings().ListingItems()

Thank you in advance for your help.
Jun 27 '08 #1
4 1090
On May 1, 10:43 am, "Name Withheld" <NoS...@NoSpam.comwrote:
OK i know this is a 101 question but...

ASP.NET/VB.NET

ListingItems() as string

I need a nested array of Listings().ListingItems() so i can read a text file
and split each line and insert the results into this array. The read and
split are easy (and so should be setting up this array), but i am banging my
head on how to get my class defined as an array.

Again, end result is Listings().ListingItems()

Thank you in advance for your help.
If I understand correctly, you just need to declare an array of string
arrays:

Dim Listings(size) As String()
Listings(0) = methodThatGetsAStringArray()
Instead of using an array for this purpose, consider using a List:

Dim Listings As New List(Of String())
Listings.Add(methodThatGetsAStringArray())

That way you don't need to know how many in advance to create like you
would when using an array.

Chris
Jun 27 '08 #2
Here is what i am doing.

Lindex = 0
Do
Line = r.ReadLine()
If Line IsNot Nothing Then
ListingItem = Split(Line, chr(9))
Lindex += 1
End If
Loop Until Line Is Nothing

This works for ONE line, the last line. I think what i need to do here is:

Lindex = 0
Do
Line = r.ReadLine()
If Line IsNot Nothing Then
Listings(LIndex).ListingItem = Split(Line, chr(9))
Lindex += 1
End If
Loop Until Line Is Nothing

That is why the structure of the variable needs to be
Listings().ListingItems(). Or is there another way to do this. I need to
take this information and display it two ways, one as a summary (select
fields) list and secondly all the data per a user's selection (index)
formatted as a real estate listing.

"Chris Dunaway" <du******@gmail.comwrote in message
news:10**********************************@y21g2000 hsf.googlegroups.com...
On May 1, 10:43 am, "Name Withheld" <NoS...@NoSpam.comwrote:
>OK i know this is a 101 question but...

ASP.NET/VB.NET

ListingItems() as string

I need a nested array of Listings().ListingItems() so i can read a text
file
and split each line and insert the results into this array. The read and
split are easy (and so should be setting up this array), but i am banging
my
head on how to get my class defined as an array.

Again, end result is Listings().ListingItems()

Thank you in advance for your help.

If I understand correctly, you just need to declare an array of string
arrays:

Dim Listings(size) As String()
Listings(0) = methodThatGetsAStringArray()
Instead of using an array for this purpose, consider using a List:

Dim Listings As New List(Of String())
Listings.Add(methodThatGetsAStringArray())

That way you don't need to know how many in advance to create like you
would when using an array.

Chris

Jun 27 '08 #3

"Name Withheld" <No****@NoSpam.comwrote in message
news:ex**************@TK2MSFTNGP04.phx.gbl...
Here is what i am doing.

Lindex = 0
Do
Line = r.ReadLine()
If Line IsNot Nothing Then
ListingItem = Split(Line, chr(9))
Lindex += 1
End If
Loop Until Line Is Nothing

This works for ONE line, the last line. I think what i need to do here
is:

Lindex = 0
Do
Line = r.ReadLine()
If Line IsNot Nothing Then
Listings(LIndex).ListingItem = Split(Line, chr(9))
Lindex += 1
End If
Loop Until Line Is Nothing

That is why the structure of the variable needs to be
Listings().ListingItems(). Or is there another way to do this. I need to
take this information and display it two ways, one as a summary (select
fields) list and secondly all the data per a user's selection (index)
formatted as a real estate listing.

"Chris Dunaway" <du******@gmail.comwrote in message
news:10**********************************@y21g2000 hsf.googlegroups.com...
>On May 1, 10:43 am, "Name Withheld" <NoS...@NoSpam.comwrote:
>>OK i know this is a 101 question but...

ASP.NET/VB.NET

ListingItems() as string

I need a nested array of Listings().ListingItems() so i can read a text
file
and split each line and insert the results into this array. The read
and
split are easy (and so should be setting up this array), but i am
banging my
head on how to get my class defined as an array.

Again, end result is Listings().ListingItems()

Thank you in advance for your help.

If I understand correctly, you just need to declare an array of string
arrays:

Dim Listings(size) As String()
Listings(0) = methodThatGetsAStringArray()
Instead of using an array for this purpose, consider using a List:

Dim Listings As New List(Of String())
Listings.Add(methodThatGetsAStringArray())

That way you don't need to know how many in advance to create like you
would when using an array.

Chris

Try the following ::

Dim tst As New List(Of List(Of String))

LS

Jun 27 '08 #4
Never mind i went with a datatable/dataview solution
"Lloyd Sheen" <a@b.cwrote in message
news:uU**************@TK2MSFTNGP02.phx.gbl...
>
"Name Withheld" <No****@NoSpam.comwrote in message
news:ex**************@TK2MSFTNGP04.phx.gbl...
>Here is what i am doing.

Lindex = 0
Do
Line = r.ReadLine()
If Line IsNot Nothing Then
ListingItem = Split(Line, chr(9))
Lindex += 1
End If
Loop Until Line Is Nothing

This works for ONE line, the last line. I think what i need to do here
is:

Lindex = 0
Do
Line = r.ReadLine()
If Line IsNot Nothing Then
Listings(LIndex).ListingItem = Split(Line, chr(9))
Lindex += 1
End If
Loop Until Line Is Nothing

That is why the structure of the variable needs to be
Listings().ListingItems(). Or is there another way to do this. I need
to take this information and display it two ways, one as a summary
(select fields) list and secondly all the data per a user's selection
(index) formatted as a real estate listing.

"Chris Dunaway" <du******@gmail.comwrote in message
news:10**********************************@y21g200 0hsf.googlegroups.com...
>>On May 1, 10:43 am, "Name Withheld" <NoS...@NoSpam.comwrote:
OK i know this is a 101 question but...

ASP.NET/VB.NET

ListingItems() as string

I need a nested array of Listings().ListingItems() so i can read a text
file
and split each line and insert the results into this array. The read
and
split are easy (and so should be setting up this array), but i am
banging my
head on how to get my class defined as an array.

Again, end result is Listings().ListingItems()

Thank you in advance for your help.

If I understand correctly, you just need to declare an array of string
arrays:

Dim Listings(size) As String()
Listings(0) = methodThatGetsAStringArray()
Instead of using an array for this purpose, consider using a List:

Dim Listings As New List(Of String())
Listings.Add(methodThatGetsAStringArray())

That way you don't need to know how many in advance to create like you
would when using an array.

Chris


Try the following ::

Dim tst As New List(Of List(Of String))

LS

Jun 27 '08 #5

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

Similar topics

2
by: Wm | last post by:
I'm trying to get a handle on the best way to handle setting up my listings so that I display groups of about 25 records per page. I currently have a page that returns over 1,000 names/addresses,...
11
by: ben lessani | last post by:
Hi guys, I've been searching all day for a method on how to integrate the listings off ebaY onto my website, but I have had no joy whatsoever. I want to be able to open a listing based on the...
4
by: Erik Lechak | last post by:
Hello all, Is there anyone out there that has written anything in python to download tv listings (no XML)? All the tv listing stuff that I can find is way too complex for my taste (includes...
2
by: Sam Churchill | last post by:
I have need to show a list of areas indented hierarchically on an ASP web page like the following example. The World Europe United Kingdom England Wales Scotland Northern Ireland
2
by: sjoshi | last post by:
I'm trying this simple query but getting multiple listings for change_number field SELECT c.Change_Number, c.Submission_Date, c.Short_Description, c.CurrentStatus, dlv.Name, s.Description,...
4
by: MDW | last post by:
Posted this on another board, but evidently it was off-topic there...hope you folks will be able to provide some guidance. I've been working on a Web site for a business (my first non-personal...
5
by: Robert Latest | last post by:
Hello, if HTML authoring includes HTML autogeneration, this request is on-topic. Otherwise please forgive me and point me in the right direction. I'd like to make a bunch of dirs full of files...
1
by: Name Withheld | last post by:
OK i know this is a 101 question but... I need a nested array of Listings().ListingItems() so i can read a text file and split each line and insert the results into this array. The read and...
7
by: samatair | last post by:
I need to change an existing listings page with pagination. Each page shows 10 listings and they are ordered by the date they are added to the site. Now recently added listings show up in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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,...
0
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...
0
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,...

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.