You should organize the output into a table with 3 columns. The easiest way
is to use GridView control databound to your dataset.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Rahul" <> wrote in message
news: ups.com...
> Friends,
>
> My Problem is related to writing a text file from a database
> using .Net. in a particular string format.
> I have a dataset with a table, let suppose in this table there are
> three fields.
> - Code
> - Description
> - Amount
>
> At the time of writing a text file I use in a for loop -
>
> String.Format("{0,10}{1, 40} {2,-10}", DS.Table(0).Row(i)
> ("Code").ToString(), DS.Table(0).Row(i)("Description").ToString(),
> DS.Table(0).Row(i)("Amount").ToString())
>
>
> But the problem is related to the alignment. Data comes like in
> following format:
>
> 01Code 01Desc 2000
> 02Code 02Desc 3000
> 03CodeABC 03Desc 4000
> 04xyz 04Desc 5000
>
>
> I want Data comes in following proper alignment format.
>
> 01Code 01Desc 2000
> 02Code 02Desc 3000
> 03CodeABC 03Desc 4000
> 04xyz 04Desc 5000
>
>
> So anybody knows the solutions of this problem, please and please
> reply imediately, its urgent.
>
>
>
> Rahul
>