asp.net 按行读取包含中文的文本(txt)文件并取得行数
来源:互联网 发布:螺栓重量计算软件 编辑:程序博客网 时间:2024/04/30 20:05
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中文文本
- POJ 1080 LCS扩展!
- Linux动态库(.so)搜索路径
- exchange发不出外部邮件
- asp.net(c#)如何读取上传过程中的.txt文件中的数据,并将其写入数据库的
- ASP.net AJAX置于框架中出现JScript运行时错误的解决方法
- asp.net 按行读取包含中文的文本(txt)文件并取得行数
- “实践型”高级软件工程师精英成就计划,向年薪10W冲刺!
- 【分享】印刷企业信息管理系统分析
- 密码生成器
- nvdia芯片集成网卡问题
- 各大杀毒软件比较与引擎介绍
- Writing and Reading and Deleting a Cookie on the Browser
- SCJP 2007-06-14
- 关于本博客所有代码下载方式及说明