Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
1.00/5 (1 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
Comments
I.explore.code 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    
yes
I.explore.code 16-Aug-12 7:36am    
why? :) I mean, you can do it but why sacrifice the ease of use that comes with objects?
[no name] 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?
I.explore.code 16-Aug-12 11:20am    
in that case, I would like to quote my competitive price of £100 ;)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900