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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Majid KamaliPosted Sep 13, 2010, 9:33 AM
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.
Mahesh ChandPosted Sep 13, 2010, 8:57 AM
Make sure you type title and question clearly. If you have Microsoft word, type your questions there and run a spell checker.
Thanks!
Dorababu MekaPosted Sep 13, 2010, 1:40 AM
http://www.c-sharpcorner.com/UploadFile/ankurmee/2292/Default.aspx