문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top