ex: in my page take one datagridview and button;
when ia am clicking button text file is loadeed into datagrid view cells........
my text file is like.........
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dorababu MekaRank #457 · 5.5K reputationPosted Sep 12, 2010, 9:40 PM EDT
http://www.c-sharpcorner.com/UploadFile/ankurmee/2292/Default.aspx
Mahesh ChandRank #1 · 393.3K reputationPosted Sep 13, 2010, 4:57 AM EDT
Make sure you type title and question clearly. If you have Microsoft word, type your questions there and run a spell checker.
Thanks!
Majid KamaliRank #6,453 · 266 reputationPosted Sep 13, 2010, 5:33 AM EDT
string[] Lines = System.IO.File.ReadAllLines("FileName");
foreach (string Line in Lines)
{
string[] Fields = Line.Split(' ');
. . . // Now You Have All The Strings of one line Separated. Now You Can Put Them In DataGrid Cells !
}
BTW Your Question Title is not relevant to its content.