tags:

views:

12

answers:

2

I have a DataTable of data from an Access database that I need to display in a <textarea> as tab-delimited text. My first thought was just using a Repeater and use the ItemTemplate to format the row, but the issue is that Visual Studio will automatically convert tab characters to a set of ordinary spaces. Is there some way to get around this? Or is there a better way to achieve this?

+1  A: 

Set your text area to runat server and in your code behind create a string with fixed width columns as the content. Look into padleft and padright.

jmoreno
A: 

The HTML renderer will almost certainly convert the tabs into spaces on the client side in any case.

An HTML table when copied and pasted into most spreadsheet applications will convert the cells automatically, so it is a matter of what you are trying to achieve.

Roger Willcocks