- 博客(11)
- 收藏
- 关注
原创 c#操作文本文件
读:TextBox1.Text=File.ReadAllText("d:/b.txt",Encoding.Default); 写:File.WriteAllText("d:/a.txt", TextBox1.Text, Encoding.Default); 追加:File
2011-08-19 10:57:22
413
原创 asp:Repeater中输出1开始的序号
<asp:Repeater ID="Repeater1" runat="server"><br /><ItemTemplate> <%#Container.ItemIndex+1 %><br /></ItemTemplate><br /></asp:Repeater>
2011-04-25 17:25:00
996
转载 彻底禁掉ViewState
禁止ViewState是可以在整个应用的级别,页面的级别,和控件的级别来禁止。整个应用的级别禁止ViewState: ,页面的级别如:,控件的级别如:。禁止了ViewState之后,页面中的__ViewState字段已经大大减小了,但是还是存在。上面已经提到了,__ViewState字段里剩下的内容就是ControlState的。如果想让__ViewState字段没有内容,可以改写Page类的此两方法:protected override void SavePageStateToPersistenceMe
2010-12-06 14:50:00
672
原创 识别wap和web客户端浏览器
asp代码+--------------------------------------------------------+| 识别WAP或WEB客户端浏览器 (asp版本)| 作者: 石头 (stonemx@163.com | www.stonemx.com) +--------------------------------------------
2009-09-11 11:17:00
1060
原创 c#post数据提交
string url = "http://localhost/Default.aspx";string postData = "aa=iceapple.net&bb=yibin.net"; //这是要post的数据byte[] data = Encoding.UTF8.GetBytes(postData);HttpWebRequest request = (HttpWebRequ
2009-09-02 10:32:00
1540
原创 server.transfer 用法
a.aspx页面: protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { Server.Transfer("b.aspx"); }
2009-02-24 14:04:00
3099
5
原创 我遇到的Object reference not set to an instance of an object.错误的解决办法
症状: Server Error in / Application. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An unhandled
2008-06-13 19:02:00
30477
2
转载 GridView.RowCommand 事件 GridView.DataKeys 属性
在单击 GridView 控件中的按钮时,将引发 RowCommand 事件。这使您可以提供一个这样的事件处理方法,即每次发生此事件时执行一个自定义例程。GridView 控件中的按钮也可调用该控件的某些内置功能。若要执行这些操作之一,请将按钮的 CommandName 属性设置为下表中的某个值。
2008-06-13 14:47:00
2633
原创 .NET 2.0获取配置文件AppSettings和ConnectionStrings节数据的方法
protected void Page_Load(object sender, EventArgs e) { Label1.Text = ConfigurationManager.ConnectionStrings["connectionStringsName"].ToString(); Label2.Text = ConfigurationManager.App
2008-01-22 17:09:00
789
转载 你的.net 2.0 真的能与1.1 安全正确地运行在同一台电脑上吗? 小心Server Application Unavailable 错误
各位在同一电脑上同时安装并运行.net 1.1 和 .net 2.0 两个版本的朋友要小心啊! 您的项目是不是时不时会出现 Server Application Unavailable 错误呢?或者一直连续都出这个错误! 今天我朋友将其从1.1升级至2.0的项目发布至公司安装有windows 2003的服务器上,结果2.0的项目始终无法成功运行。甚至还造成服务器上正在
2007-07-06 13:59:00
693
转载 ASP.NET下的FCKEditor2.4.1配置
用最簡單的語言描述一下。其它配置和優化就不說了,只說怎麼讓它在asp.net環境下能用,能上傳。1、下載文件 http://www.fckeditor.net/downloadFCKeditor_2.4.1.zip 和 FCKeditor.Net_2.2.zip這是目前最新的版本。 FCKeditor_2.4.1.zip 為fckeditor的頁面文件 FCKeditor.Net_2.2.
2007-06-13 16:30:00
802
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人