Click here to Skip to main content
15,886,693 members
Home / Discussions / C#
   

C#

 
GeneralRe: old value after validating event of datetimepicker Pin
tabstop28-Jul-08 20:49
tabstop28-Jul-08 20:49 
Questionupdate xml file Pin
arkiboys28-Jul-08 2:14
arkiboys28-Jul-08 2:14 
AnswerRe: update xml file Pin
teejayem28-Jul-08 2:39
teejayem28-Jul-08 2:39 
QuestionDeploying multiple projects Pin
jamesjk28-Jul-08 1:04
jamesjk28-Jul-08 1:04 
AnswerRe: Deploying multiple projects Pin
Thomas Stockwell28-Jul-08 1:33
professionalThomas Stockwell28-Jul-08 1:33 
GeneralRe: Deploying multiple projects Pin
jamesjk28-Jul-08 1:54
jamesjk28-Jul-08 1:54 
GeneralRe: Deploying multiple projects Pin
Thomas Stockwell28-Jul-08 2:03
professionalThomas Stockwell28-Jul-08 2:03 
QuestionopenFileDialog win form Pin
arkiboys28-Jul-08 0:59
arkiboys28-Jul-08 0:59 
Hello,
The following code shows how to use the openFileDialog to read the contents of a .csv file into a textbox.

Question:
After selecting the file iin the dialog, how do I actually open the file?
remember that I would like to open the .csv file and NOT read it into the textbox.

StreamReader ts = null;

openFileDialog1.CheckFileExists = true;
openFileDialog1.CheckPathExists = true;
openFileDialog1.DefaultExt = "csv";

openFileDialog1.Filter = "Text files (*.csv)|*.csv|" + "All files|*.*";
openFileDialog1.Multiselect = false;
openFileDialog1.FilterIndex = 2;
openFileDialog1.ValidateNames = true;

if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
ts = new StreamReader(openFileDialog1.OpenFile());

txtSQL.Text = ts.ReadToEnd();
}
}

Thanks
AnswerRe: openFileDialog win form Pin
stancrm28-Jul-08 1:05
stancrm28-Jul-08 1:05 
GeneralRe: openFileDialog win form Pin
arkiboys28-Jul-08 1:17
arkiboys28-Jul-08 1:17 
GeneralRe: openFileDialog win form Pin
sumit703428-Jul-08 1:33
sumit703428-Jul-08 1:33 
GeneralRe: openFileDialog win form Pin
arkiboys28-Jul-08 1:58
arkiboys28-Jul-08 1:58 
GeneralRe: openFileDialog win form Pin
sumit703428-Jul-08 2:20
sumit703428-Jul-08 2:20 
GeneralRe: openFileDialog win form Pin
Thomas Stockwell28-Jul-08 1:35
professionalThomas Stockwell28-Jul-08 1:35 
QuestionHow to draw a status bar panel ? Pin
reallyneedhelp28-Jul-08 0:48
reallyneedhelp28-Jul-08 0:48 
AnswerRe: How to draw a status bar panel ? Pin
Harvey Saayman28-Jul-08 0:55
Harvey Saayman28-Jul-08 0:55 
AnswerRe: How to draw a status bar panel ? Pin
Thomas Stockwell28-Jul-08 1:36
professionalThomas Stockwell28-Jul-08 1:36 
QuestionPrinter service using c#.net Pin
balu1234528-Jul-08 0:19
balu1234528-Jul-08 0:19 
AnswerRe: Printer service using c#.net Pin
teejayem28-Jul-08 2:54
teejayem28-Jul-08 2:54 
Questioncreating page in the same window Pin
ktamanna28-Jul-08 0:13
ktamanna28-Jul-08 0:13 
AnswerRe: creating page in the same window Pin
Harvey Saayman28-Jul-08 1:01
Harvey Saayman28-Jul-08 1:01 
GeneralRe: creating page in the same window Pin
ktamanna30-Jul-08 18:24
ktamanna30-Jul-08 18:24 
AnswerRe: creating page in the same window Pin
nelsonpaixao28-Jul-08 13:29
nelsonpaixao28-Jul-08 13:29 
QuestionDateTime issue in PDA application Pin
neer127-Jul-08 23:47
neer127-Jul-08 23:47 
AnswerRe: DateTime issue in PDA application Pin
DaveyM6928-Jul-08 0:33
professionalDaveyM6928-Jul-08 0:33 

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.