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

Array question. Coding help required

Was wondering if someone could please help me with an array I'd like to
create in an asp.net page. I have to design an array which stores the values
of addresses manually entered into textboxes (txtAdd,txtCity&txtPostcode).
The array must hold the values of these three textboxes. I would like the
array to also display these address values in an asp:Lable within a
asp:TableCell inside a asp:Table.

I want all this to happen on the onclick event of a button. So basically
store the textbox values into an array and then populate there contents in a
asp:Table. I need the array to loop around as many times required until the
user stops entering values.

I am very new to coding and have never designed an array like this before so
Im finding it difficult to do. Could someone please help me with the code to
achieve this. Thanks in advance for any help anyone can give me

Nov 16 '05 #1
1 1799
Declaring an array that contains the text values of 3 textboxes (tb1, tb2,
tb3):

string [] values = new string[] { tb1.Text, tb2.Text, tb3.Text };

As to getting the text into a label, you can do something like:

myLabel.Text = string.Format("{0}\n{1}\n{2}", values[0], values[1],
values[2]);

Please excuse any minor syntax errors, as this hasn't been compiled and it's
immediately after lunch ;)
--
Mickey Williams
Author, "Visual C# .NET Core Ref", MS Press
www.neudesic.com
www.servergeek.com
"Stephen" <St*****@discussions.microsoft.com> wrote in message
news:F1**********************************@microsof t.com...
Was wondering if someone could please help me with an array I'd like to
create in an asp.net page. I have to design an array which stores the
values
of addresses manually entered into textboxes (txtAdd,txtCity&txtPostcode).
The array must hold the values of these three textboxes. I would like the
array to also display these address values in an asp:Lable within a
asp:TableCell inside a asp:Table.

I want all this to happen on the onclick event of a button. So basically
store the textbox values into an array and then populate there contents in
a
asp:Table. I need the array to loop around as many times required until
the
user stops entering values.

I am very new to coding and have never designed an array like this before
so
Im finding it difficult to do. Could someone please help me with the code
to
achieve this. Thanks in advance for any help anyone can give me

Nov 16 '05 #2

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

Similar topics

33
by: John Timbers | last post by:
I'd like to purchase Visual C# .Net for learning purposes only since it's a lot cheaper than Visual Studio (note that I'm a very experienced C++ developer). Can someone simply clarify the basic...
55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
1
by: john | last post by:
Relatively new to C coding, so any help would greatly be appreciated. I'm having problems try to return my string array from my parsing function. When I do a printf I am getting the correct value...
204
by: Alexei A. Frounze | last post by:
Hi all, I have a question regarding the gcc behavior (gcc version 3.3.4). On the following test program it emits a warning: #include <stdio.h> int aInt2 = {0,1,2,4,9,16}; int aInt3 =...
15
by: Geoff Cox | last post by:
Hello, Can I separately declare and initialize a string array? How and where would I do it in the code below? It was created using Visual C++ 2005 Express Beta 2 ... In C# I would have ...
11
by: Geoff Cox | last post by:
Hello, I am trying to get a grip on where to place the initialization of two arrays in the code below which was created using Visual C++ 2005 Express Beta 2... private: static array<String^>^...
20
by: quantumred | last post by:
I found the following code floating around somewhere and I'd like to get some comments. unsigned char a1= { 5,10,15,20}; unsigned char a2= { 25,30,35,40}; *(unsigned int *)a1=*(unsigned int...
5
by: Andreas Schmitt | last post by:
Hi, I recently worked on an open source project and tried to make on of the arrays they are using dynamically allocated to get rid of the max size. I used the realloc instead of the usual C++...
152
by: vippstar | last post by:
The subject might be misleading. Regardless, is this code valid: #include <stdio.h> void f(double *p, size_t size) { while(size--) printf("%f\n", *p++); } int main(void) { double array = { {...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.