求助,用datalist显示存放在数组中的内容
有这样一个文本文件:
a|b|c|d|e
1|2|3|4|5
11|22|33|44|55
现在需要读取这个文本,并以表格的形式显示在页面上,准备用datalist显示,但是不怎么清楚,请高手指教。我是这样读文本并赋值给某个数组a
///the path是我存放文本的路径
using (TextReader sr = new StreamReader(thePath,System.Text.Encoding.GetEncoding("GB2312")))
{
string line;
line=sr.ReadLine();
while ((line = sr.ReadLine()) != null)
{
string[] a;
a=line.Split('|');
}
用怎样的方式按照文本的样子以表格形式显示在web页面上呢?