Click here to Skip to main content
13,298,965 members (40,665 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
gladiatron 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 16-Aug-12 7:05am
gladiatron 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 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 16-Aug-12 11:20am
in that case, I would like to quote my competitive price of £100 ;)
Wes Aday 16-Aug-12 11:27am
If you negociate with him long enough, he might miss his opportunity to turn in his homework.
gladiatron 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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171207.1 | Last Updated 16 Aug 2012
Copyright © CodeProject, 1999-2017
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