1
Answer

How to get Document's path to string in c# ???

thiago costa

thiago costa

12y
1.7k
1
hello there guys...

I am making a program, where I need to get the PATH for the c:\**USEr**\My Documents

I need to find path, and make it be a string...

Any ideas ???

Thanks guys



By the way, I love this website, for a long time, but I like the old looks WAY WAY WAY WAY more conventional more practical, better.
I still like it though, but there should be a survey to see what we all think...

once again, thanks guys.
Answers (1)
0
Suthish Nair

Suthish Nair

NA 31.7k 4.6m 14y

Use Linq to datatable, refer sample.
DataTable dtMain = new DataTable();
DataTable dt1 = new DataTable();
//bind datatable
var rows1_10 = from item in dt1.AsEnumerable()
     select item;
var top1_10 = rows1_10.Take(10);
//do a for-loop and insert into dtMain
DataTable dt2 = new DataTable();
//bind datatable
var rows2_10 = from item in dt2.AsEnumerable()
     select item;
var top2_10 = rows2_10.Take(10);
//do a for-loop and insert into dtMain
0
Rajesh Kumar

Rajesh Kumar

NA 66 0 14y

Hi Purna,
Try to create  two temp datasets with a datatable containing 10 rows. and bind these two dataset to gridviews seperately.
Thanks
Rajesh