How to save info entered into several txt boxes without using a txt fi

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 1773 Views - Last Post: 21 March 2010 - 08:32 AM Rate Topic: -----

#1 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 07:51 AM

Alright,

It have been along time since i have been here, and now i am back for more help. Well i am trying to make a FTP program for this anti-cheat community. I am trying to save the ftp info entered into the text boxes without it having to go into a text file. i have tried to figure out how to do it with an array, but i have no idea. I am also using Microsoft Visual C# Express Edition. Any ideas?
Is This A Good Question/Topic? 0
  • +

Replies To: How to save info entered into several txt boxes without using a txt fi

#2 Ferencn  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 71
  • View blog
  • Posts: 322
  • Joined: 01-February 10

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 07:58 AM

If you don't want to use a file, period, you can store the data the registry, for example.
Maybe you can help us by explaining what your goal is: make the data 'unreadable' for prying eyes, or is a file 'not an option'?
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6091
  • View blog
  • Posts: 23,605
  • Joined: 23-August 08

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 07:59 AM

I'm confused...you're trying to save it PERMANENTLY, or just for the length of the program's execution?
Was This Post Helpful? 0
  • +
  • -

#4 beju0506  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 78
  • Joined: 23-February 08

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:00 AM

Frieling,

I'm not sure I follow what you mean when you say you want to "save the info without it having to go into a text file"? Where do you want the data to go eventually?

If you want to just store the information temporarily, you can use ArrayList and add the data to the arraylist using the Add() method.

Hope that helps!


View Postfrieling, on 20 March 2010 - 06:51 AM, said:

Alright,

It have been along time since i have been here, and now i am back for more help. Well i am trying to make a FTP program for this anti-cheat community. I am trying to save the ftp info entered into the text boxes without it having to go into a text file. i have tried to figure out how to do it with an array, but i have no idea. I am also using Microsoft Visual C# Express Edition. Any ideas?

Was This Post Helpful? 0
  • +
  • -

#5 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:00 AM

Well what it is is after someone enters a value into that text box, and they close the program. When they reopen it i want the program to have the ftp info already there for them.
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6091
  • View blog
  • Posts: 23,605
  • Joined: 23-August 08

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:04 AM

Obviously you need to save it into a file, or in the registry. I would suggest Isolated Storage for a file location.
Was This Post Helpful? 0
  • +
  • -

#7 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:06 AM

what do you mean by registery? How would i do that?
Was This Post Helpful? 1
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6091
  • View blog
  • Posts: 23,605
  • Joined: 23-August 08

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:09 AM

You read and learn
Was This Post Helpful? 0
  • +
  • -

#9 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:11 AM

Thanks.
Was This Post Helpful? 1
  • +
  • -

#10 beju0506  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 78
  • Joined: 23-February 08

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:12 AM

Well, in that case, since you said you don't want to use a text file, you could have an embedded SQL database in your program and save the data into that. It's not too difficult to set up. There are numerous tutorials on how to use it (but it's a bit involved to describe here) so check Google... Also, the book "Head First C#" has a step by step walkthrough on how to set one up (you could probably just browse through it at the bookstore and get the gist of it), it's in the first or second chapter.

This link might help:

http://csharptuts.wo...a-sql-database/

[Edit: I just realized that you only wanted to save just a little bit of data, not an entire list of connections... for only a small amount of data, this might be overkill]

This post has been edited by beju0506: 20 March 2010 - 08:14 AM

Was This Post Helpful? 0
  • +
  • -

#11 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:14 AM

is it possible when i am setting the value of the registry that i can put in the value entered in the txtbox?
Was This Post Helpful? 0
  • +
  • -

#12 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 08:41 AM

Okay then,

Say i want to put it into a text file, now when i hit Get FTP Info, how will it extract the info from the txt file, and put it into the seperate txt boxes?
Was This Post Helpful? 0
  • +
  • -

#13 beju0506  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 78
  • Joined: 23-February 08

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 11:53 AM

Frieling,

It sounds like you should probably brush up on your file IO in C#; that's what you'll need to get data from the text files into variables. Check Google for "file IO" and "C#".

You can assign the data from the variables to the text box by using this method:

string ipaddy = textBox1.Text.ToString();



Hope this helps...




View Postfrieling, on 20 March 2010 - 07:41 AM, said:

Okay then,

Say i want to put it into a text file, now when i hit Get FTP Info, how will it extract the info from the txt file, and put it into the seperate txt boxes?

Was This Post Helpful? 0
  • +
  • -

#14 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 12:08 PM

well,

would i have to do this to all the txtboxes?
Was This Post Helpful? 0
  • +
  • -

#15 beju0506  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 78
  • Joined: 23-February 08

Re: How to save info entered into several txt boxes without using a txt fi

Posted 20 March 2010 - 12:35 PM

Well, if you want them to have data in them you would ;)



View Postfrieling, on 20 March 2010 - 11:08 AM, said:

well,

would i have to do this to all the txtboxes?

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2