dynamic array

How would I create an array based on comma seperated values from a database

table?
The idea is that in my table I will have a field called size like the
following
Record 1: 32,34,36,38,40,42
Record 2: 32,34,36
Record 3: Small, Medium, Large
Record 4: Small, Large
On my page I would like to split these and enter them in a drop down list.
Each record may well have a different number of sizes
Any advice gratefully received
0
quelu
11/11/2003 11:08:18 AM
asp.net.getting-started 91979 articles. 3 followers. Follow

1 Replies
349 Views

Similar Articles

[PageSpeed] 0

Easy, use the Split method of each string ...
<%@ Page Language="VB" %>

<script runat="server">
Sub Page_Load( ByVal sender As Object, ByVal eArgs As EventArgs )
Dim ValuesAsCSV As String = "one,two,three,four,five"
Dim ValuesAsArrayList As Array
ValuesAsArrayList = ValuesAsCSV.Split( "," )
ValuesRepeater.DataSource = ValuesAsArrayList
ValuesRepeater.DataBind()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Repeater id="ValuesRepeater" runat="server">
<ItemTemplate>
<%# Container.DataItem() %>
<br />
</ItemTemplate>
</asp:Repeater>
</form>
</body>
</html>

Alister
0
SomeNewKid
11/11/2003 12:11:53 PM
Reply:

Similar Artilces:

problem with dynamic array of dynamic array
var a:array of array of integer; begin setlength(a,2); setlength(a[0],1); setlength(a[1],2); a[0,0]:=1; //it is ok a[0,1]:=2; //it is not ok in my understanding a[0,1]:=2 is not ok because a[0] has only one element as i declared setlength(a[0],1) so i dont understand why this code exemple is compiled and run just fine ? > {quote:title=Yossi Rozenberg wrote:}{quote} > in my understanding a[0,1]:=2 is not ok because a[0] has only one element as i declared setlength(a[0],1) so i dont understand why this code exemple is compiled and run just fine ? By default, acces...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

MOVED: problem with dynamic array of dynamic array
Moved to: embarcadero.public.delphi.language.delphi.general or: https://forums.embarcadero.com/thread.jspa?threadID=57076 -- Rudy Velthuis Rudin's Law: In a crisis that forces a choice to be made among alternative courses of action, people tend to choose the worst possible course. ...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

Trying to dynamically create arrays, getting can't use string as ARRAY ref
Greets. I have a 'config file' that contains a group name (alphanumeric) and machine name/numbers separated by whitespace. Each group is on it's own line. The file looks like this: prod01 456 345 234 prod02 789 517 325 ....etc, etc, etc... What I am attempting to do is: Put the file contents into an array Pull the first entry off the array Add the name of the array to a 'master array' list of the machine groups Then create another array, which would be referenced by the group name, and contains the machines associated with the group. Here is the code...

Where to start and how did you get started?
Hi, I have had a feeling for a long time to jump into the adds market for some time due to my low income (shooting for the stars) and I don't have anything better to do these days. But I find it really difficult not to give up due to lack of guides (what I can find atleast) and all the hard words which only makes me confused. But I won't give up. Never. Not sure if this is the right place to post this, but I deffinitly would be really greatfull for help getting started. How did you get started? +If there are any teacher that wanna show me the ropes private, I can give payment with ...

Getting started .net website
Hi folks,Does anyone here know of a good website to just sit back and read for learning .net? Thanks in advance.Baldeep Right here... Click the Get Started and Learn sections here. Quite a few out there - - this one, has a lot of good videos -  also ASPNet101.com, but then, I might be a little prejudiced David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(P...

How do I get started with AJAX.Net?
Hi All, I'm a seasoned asp.net developer but have not yet ventured into atlas et al.  I prefer books, but will take whatever I can get if it's good and will get me going. Any recommendations? Thx in advance. Jeff try here first http://ajax.asp.net/downloads/default.aspx?tabid=47 then learn from sample and docJames Wu (MIB426).NET is only way to goMCP, MCSE, MCDBA, MCSD, MCAD I find the materials online display features and implementations but are lacking architectural depth, and am seeking more comprehensive resources. By architectural depth, I mean that I cannot watch ...

Getting started with JScript.NET
I'm a Javascript and Actionscript developer, and the thought of being able to do server-sides in something I know was too good to resist. Does anyone know some good tutorials for developing ASP.NET pages in JScript?  I can find lots of console code, but simple things are hard: like I can't even figure out how to print something out to the web page (just a string). What I'm really trying to do is access a database, verify a login, and print JSON out to the response.  What should I do to start?  Is there a better way to do this? (IE: using some JSON library already?). I'm commun...

Getting started with Dynamic Data!
Hi , Sorry I checked out the entire discussion but did not find any post for newbies! I installed .net framework 3.5 SP1  but when I tried to create a new Dynamic Data project, I could not find such an option in "File -> New Web Site"  or "File -> New Project". Do I have to install something else?Please help.Thanks  I'm asuming that when you say .net framework 3.5 SP1 you mean Visual Studio 2008 Service Pack 1 Beta. If you cannot see the Dynamic Data templates when creating an new project/website then you have an installation problem please...

Getting Started with .net and a few questions
Hello I've done some asp and php programming along with various other languages in the past and slowing getting my head around .net.I have a small project of creating a Holiday Booking system on our Intranet and just trying to get the first part to work properly will hopefully get me sorted for the whole project. The Intranet is running on .net 2 and I prefer to use the VB code rather than C#. This is connecting to an SQL server.My initial page that I am trying to create is just for an admin user to view which dates in a table have been specified as Bank Holidays and be able to add ...

get all the arrays with names starting with xyz
Hi all : I have few arrays with names starting with "xyz_". After the initial definitions I want to change values of a particular index of all arrays whose names start with "xyz_". It would be cumbersome for me to do something like : $xyz_blahblah[$index] = "ldfhdlf"; $xyz_blooblooh[$index] = "dfhdlkfhdkf"; $xyz_foofoo[$index] = 27; .... ... & so on... particularly when the number of arrays are many !! Is there any method to do this easily ?? Or could I get the names of all arrays with a particular starting string &...

Getting Started Without VS.NET
Hi all, does anyone know how any online resources that can show me how to create web apps that include code-behind, and uer controls without using VS.NET? I have VS.NET in work, but would also like to do work at home, but cannot install VS.NET on my home laptop because I simply dont' have the space or processor power. Any online articles would be welcome, as will any open-source apps - I currently have SharpDevelop, but I find it unstable as it crashes my laptop alot of the time. Thanks Tryst Did you try Web Martix? It is a FREE tool from Microsoft.Regards, Narayana ...

How to get the string array that starts with prefixtext
 Helloo, i am using a web service to autocomplete a textbox The database contains a keywords column ..each colum contains more than 1 keywords  LIKE "INDIA WORLD IRAQ" So i need to use RegEx to split each keywords.But How can i extract only strings that starts with the prefixtext into an array??Please HelppI hav put my code below   1 public string[] GetKeywords(string prefixText, int count) 2 { 3 // int count = 10; 4 string connString = ConfigurationManager.ConnectionStrings["dnas_newConnectionString...

How to create array of strings dynamically in vb.net?
Hi there I need to read the menu items from table and wants to create arrays of menus dynamically. Like dim Expertise() as string = {"ONE", "TWO", "THREE"} ONE, TWO and THREE will be comming from the database. Pls assist me the same for my convenient. Regards Raj_________________________________________________________________________...

Web resources about - dynamic array - asp.net.getting-started

Dynamics - Wikipedia, the free encyclopedia
Brownian dynamics , the occurrence of Langevin dynamics in the motion of particles in solution (e.g. a grain in water, as was first seen by Brown); ...

Datacenter Dynamics
Datacenterdynamics for data center information, conferences, news, videos, whitepapers and reports globally

Dynamic Chiropractic - chiropractic, news, articles, research & information for chiropractors - Find ...
Dynamic Chiropractic - chiropractic, news, articles, research & information for chiropractors - Find a Chiropractor

Playing ‘GTA V’ in a Force Dynamics motion simulator looks like a ton of fun
It's been a few weeks since I last sat down and played Grand Theft Auto V . Although it's still one of my favorite games of both this generation ...

Microsoft Dynamics CRM chief steps down
... with heavyweight Salesforce, SAP and Oracle, the head of the company's CRM division this week announced plans to step down. Microsoft Dynamics ...

Dynamic duo: Can Paul Ryan and Barack Obama work together?
Christian Science Monitor Dynamic duo: Can Paul Ryan and Barack Obama work together? Christian Science Monitor As newly elected Speaker of ...

Considering Group Dynamics in Agile Adoption
... and nations have personality traits based on their life positions . Berne further expanded his concepts in his book Structure and Dynamics of ...

The Republicans’ dynamic deception for 2016
... the media: Well, the numbers the Tax Foundation had put out is that the static cost of the plan is $3.6 trillion over 10 years, but the dynamic ...

Microsoft Dynamics AX delivers the power of the cloud to businesses
Microsoft has announced that the next release of its flagship ERP solution, Microsoft Dynamics AX, will be generally available in the first quarter ...

Master and Dynamic's MW60s are a stellar mix of style and sound
My first experience with Master &amp; Dynamic's audio gear was the time I spent with the MH40 wired headphones this summer. I noticed the company's ...

Resources last updated: 11/24/2015 9:39:13 AM