asp.net 按行读取包含中文的文本(txt)文件并取得行数
来源:互联网 发布:婚礼快剪软件 编辑:程序博客网 时间:2024/05/21 10:43
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
string Path = Server.MapPath("4.txt");
insertStr(Path);
}
}
public void insertStr(string Path)
{
string strLine = "";
int i = 0;
try
{
StreamReader sr = new StreamReader(Path, Encoding.GetEncoding("GB2312"));
strLine = sr.ReadLine();
while (strLine != null)
{
Response.Write(strLine + "<br>");
strLine = sr.ReadLine();
i++;
}
Response.Write(i);
sr.Dispose();
sr.Close();
}
catch
{
}
}
}
- asp.net 按行读取包含中文的文本(txt)文件并取得行数
- asp.net 按行读取包含中文的文本(txt)文件并取得行数
- asp.net 按行读取包含中文的文本(txt)文件并取得行数
- vb 读取txt文本的行数
- asp.net读取.txt文件
- asp.net创建并写入文本和读取文件内容
- asp.net读取txt并导入数据库
- 使用python读取txt文件的内容,并删除重复的行数
- vb 读取txt文本的行数方法比较
- 读取一个文件夹下所有的txt文件,并保存到一个txt文本中
- IDL读取txt文件行数
- asp.net读取txt文件内容
- C#读取txt文本内容行数
- asp.net(c#)如何读取上传过程中的.txt文件中的数据,并将其写入数据库的
- asp.net 读取读取sql数据并写入txt文档
- 按行读取TXT文本
- java按行读取文件并计算行数
- python 读取txt中文文本
- 基于Video4Linux的视频采集模块开发
- SQL高级查询技巧2
- Axis2创建WebService实例
- android中各种开放平台接入的总结
- 谷本系数的相似性度量 —— Tanimoto Coefficient-based Similarity
- asp.net 按行读取包含中文的文本(txt)文件并取得行数
- MyEclipse不能自动编译解决方法(转载)
- android sdk工具应用
- Eclipse IDE for C/C++ Developers 开发C/C++
- 嵌入式c面试题
- C语言学习笔记(一)
- Excel数据透视表 PivotTable
- android检测内存使用工具--procrank
- EditText添加长度限制