Click here to Skip to main content
16,016,623 members
Home / Discussions / C#
   

C#

 
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 
GeneralIntegrate Window Application With Google Map Pin
SYEDGOHAR10-Apr-12 0:26
SYEDGOHAR10-Apr-12 0:26 
QuestionHow we can check whether exchange server is installed in a system using c#. Pin
Sebastian T Xavier9-Apr-12 23:54
Sebastian T Xavier9-Apr-12 23:54 
QuestionAbout Compound File Pin
Member 81435139-Apr-12 23:50
Member 81435139-Apr-12 23:50 
AnswerRe: About Compound File Pin
Richard MacCutchan10-Apr-12 0:09
mveRichard MacCutchan10-Apr-12 0:09 
GeneralRe: About Compound File Pin
ddecoy10-Apr-12 2:44
ddecoy10-Apr-12 2:44 
GeneralRe: About Compound File Pin
PIEBALDconsult10-Apr-12 3:08
mvePIEBALDconsult10-Apr-12 3:08 
GeneralRe: About Compound File Pin
Richard MacCutchan10-Apr-12 5:30
mveRichard MacCutchan10-Apr-12 5:30 

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.