Click here to Skip to main content
15,891,943 members
Home / Discussions / C#
   

C#

 
GeneralRe: How I can isolate a Keyboard in the operative system? Pin
tsw198511-Apr-12 1:17
tsw198511-Apr-12 1:17 
AnswerRe: How I can isolate a Keyboard in the operative system? Pin
jschell10-Apr-12 8:32
jschell10-Apr-12 8:32 
AnswerRe: How I can isolate a Keyboard in the operative system? Pin
PIEBALDconsult10-Apr-12 10:40
mvePIEBALDconsult10-Apr-12 10:40 
QuestionSend SMS using GSM modem Pin
zakirox12310-Apr-12 5:50
zakirox12310-Apr-12 5:50 
AnswerRe: Send SMS using GSM modem Pin
kevinnicol10-Apr-12 6:33
kevinnicol10-Apr-12 6:33 
Questionc# calling Stored Procedures Pin
si_6910-Apr-12 5:39
si_6910-Apr-12 5:39 
AnswerRe: c# calling Stored Procedures Pin
Pete O'Hanlon10-Apr-12 5:47
mvePete O'Hanlon10-Apr-12 5:47 
AnswerRe: c# calling Stored Procedures Pin
jschell10-Apr-12 8:36
jschell10-Apr-12 8:36 
AnswerRe: c# calling Stored Procedures Pin
PIEBALDconsult10-Apr-12 10:04
mvePIEBALDconsult10-Apr-12 10:04 
Questiontext file application Pin
torres110-Apr-12 5:12
torres110-Apr-12 5:12 
AnswerRe: text file application Pin
Not Active10-Apr-12 5:16
mentorNot Active10-Apr-12 5:16 
AnswerRe: text file application Pin
VJ Reddy10-Apr-12 7:39
VJ Reddy10-Apr-12 7:39 
GeneralRe: text file application Pin
Vipin_Arora11-Apr-12 20:29
Vipin_Arora11-Apr-12 20:29 
GeneralRe: text file application Pin
VJ Reddy11-Apr-12 20:47
VJ Reddy11-Apr-12 20:47 
AnswerRe: text file application Pin
Vipin_Arora11-Apr-12 20:26
Vipin_Arora11-Apr-12 20:26 
You need StreamReader to read the data from file and show into text box, Here is the code snippet for that:
C#
 sr = new StreamReader(filename);
while (!sr.EndOfStream)
{
  if (txtBox.Text.Trim() == "")
   {
  txtBox.Text = sr.ReadLine();
   }
   else
   {
    txtBox.Text = txtBox.Text + Environment.NewLine + sr.ReadLine();
    }
}

Note: TextBox Should be Multiline, replace the "filename" with your file location and you must include:
C#
using System.IO;


Now for saving the data, you need to write the text of textbox in file. For that ou need StreamWriter. For this You can take the reference from following link:

http://msdn.microsoft.com/en-us/library/8bh11f1k.aspx[^]
Happy Coding... Smile | :)

QuestionRegarding heat maps Pin
smsravanth10-Apr-12 2:05
smsravanth10-Apr-12 2:05 
AnswerRe: Regarding heat maps Pin
ddecoy10-Apr-12 2:39
ddecoy10-Apr-12 2:39 
AnswerRe: Regarding heat maps Pin
V.10-Apr-12 3:17
professionalV.10-Apr-12 3:17 
GeneralRe: Regarding heat maps Pin
harold aptroot10-Apr-12 3:25
harold aptroot10-Apr-12 3:25 
QuestionSuggestion needs Pin
anishkannan10-Apr-12 1:18
anishkannan10-Apr-12 1:18 
AnswerRe: Suggestion needs Pin
PIEBALDconsult10-Apr-12 2:48
mvePIEBALDconsult10-Apr-12 2:48 
AnswerRe: Suggestion needs Pin
V.10-Apr-12 3:12
professionalV.10-Apr-12 3:12 
AnswerRe: Suggestion needs Pin
VJ Reddy10-Apr-12 6:56
VJ Reddy10-Apr-12 6:56 
GeneralIntegrate Window Application With Google Map Pin
SYEDGOHAR10-Apr-12 0:35
SYEDGOHAR10-Apr-12 0:35 
GeneralRe: Integrate Window Application With Google Map Pin
ddecoy10-Apr-12 2:42
ddecoy10-Apr-12 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.