Click here to Skip to main content
11,410,750 members (63,549 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.5 C#
I have one form in which i have 6 textbox control. i am storing form data in variable which is declared in class file. i want data should be stored in array and retrive data from array and display in textbox contorl. i want it should be done using class file.

below is my class file where i declared variable.

 public static string emailid, address, street, city, telephoneno, pincode ;

In form i have button to store data in variable.

 private void btnNext_Click(object sender, EventArgs e)
               {
                Data.emailid = txtemailid.Text;
                Data.address = txtaddress.Text;
                Data.street = txtstreet.Text;
                Data.ccity = txtcity.Text;
                Data.pincode = txtpincode.Text;
                Data.telephoneno = txttelephone.Text;
                }
                           
Posted 16-Aug-12 1:55am
Comments
gladiatron at 16-Aug-12 7:02am
   
do you mean instead of using a strongly typed object and properties to store data you want to use dodgy arrays which can only ever be of one type?
Manohar Khillare at 16-Aug-12 7:05am
   
yes
gladiatron at 16-Aug-12 7:36am
   
why? :) I mean, you can do it but why sacrifice the ease of use that comes with objects?
Wes Aday at 16-Aug-12 7:41am
   
Since you have not declared any array, you want someone here to write this code for you? Is that the deal? Are you looking to hire someone to write this code for you?
gladiatron at 16-Aug-12 11:20am
   
in that case, I would like to quote my competitive price of £100 ;)
Wes Aday at 16-Aug-12 11:27am
   
If you negociate with him long enough, he might miss his opportunity to turn in his homework.
gladiatron at 16-Aug-12 13:44pm
   
i m sure after seeing the price, he must have changed his mind and decided to do it himself! :) not bad, eh? may be this is a motivation enough for these people to try and help themselves first before jumping on CP...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 8,920
1 OriginalGriff 6,918
2 Maciej Los 3,390
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web01 | 2.8.150414.5 | Last Updated 16 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100