如何在Asp.net Web应用程序中将记事本数据上传到GridView [英] How to Upload Notepad Data Into GridView in Asp.net web Application
本文介绍了如何在Asp.net Web应用程序中将记事本数据上传到GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
如何将记事本数据上传到Asp.net网页应用中的GridView
在记事本的数据是这样的
xyz
168.68 169.69 7.41
169.77 165.22 5.41
200.00 100.00 10.0
i希望在asp.net web应用程序中griedview中的xyz值怎么做代码?
在记事本中没有列名直接数据就在那里。
Hi all
How to Upload Notepad Data Into GridView in Asp.net web Application
in Notepad data is like this
x y z
168.68 169.69 7.41
169.77 165.22 5.41
200.00 100.00 10.0
i want this x y z values in griedview in asp.net web application how to do code?
in notepad no column names directly data is there.
推荐答案
尝试下面提到的代码
Try below mentioned code
string [] dataSource= File.ReadAllLines(@"C:\data.txt");
GridView1.DataSource = dataSource;
GridView1.DataBind();
这篇关于如何在Asp.net Web应用程序中将记事本数据上传到GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文