• ASP.NET 2.0–善用DataSourceMode属性

    SqlDataSource控件的DataSourceMode属性决定所提取的数据要如何维护。 DataSourceMode属性的默认值是DataSet,此表示从数据库提取而来的结果集会储存在服务器内存内的一个DataSet对象中,如果您使用SqlDataSource作为GridView等控件的数据来源,并且要在GridView控件中...

    2008-02-22 09:41:22

  • DataSet 添加数据集、行、列、主键和外键等操作示例

    前台代码:html %@ Page language="c#" Codebehind="CodeUse.aspx.cs" AutoEventWireup="false" Inherits="DsAndXML.CodeUse" % !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTML HEAD titleCodeUse/title meta content="Microsoft Visual Studio 7...

    2008-02-22 09:41:24

  • .netFramework1.1下创建文件几种方式的不同之处

    using(StreamWriter sw = File.CreateText(@"d:DefaultUTF8.txt")) { sw.Write("私"); } using(StreamWriter sw=new StreamWriter(@"d:StreamUTF8.txt", false,System.Text.Encoding.UTF8)) { sw.Write("私"); } using (System.IO.FileStream fs = System.IO.File.Cr...

    2008-02-22 09:41:21

  • ASP.NET基本编程习惯

    一、 错误(以外)的处理 程序健壮性最基本要求就是程序错误的处理与捕捉,在ASP.NET中,错误的处理有和其他编程语言一样的机制,可以使用Try…Catch…Finally等方式,这一点和ASP相比具有较大的进步。而且,使用这些错误处理方法,可以大大提高程序的可读性和程序调试速度,...

    2008-02-22 09:41:22

  • ASP.NET 2.0中的输出缓存

    Just about every ASP.NET application needs to keep track of data for a user's session. ASP.NET provides the HttpSessionState class to store session-state values. An instance of the HttpSessionState class for each HTTP request is accessible throughou...

    2008-02-22 09:41:20

  • MSBuild, NAnt, NUnit, MSTest所带来的不爽

    Oh bother. Visual Studio 2003 and Cruise Control.NET. Simple and elegant. A basic NAnt script to build the solution and you're good to go. Run NUnit, output goes to a format CC can understand and Bob's yer uncle. Let me quantify this. Our cruise ser...

    2008-02-22 09:41:18

  • UpdatePanel和自定义控件中的客户端脚本

    Over the last few weeks since MS Ajax Beta rolled around I’ve been getting a number of reports of the wwHoverPanel control running into some problems when running in combination with MS Ajax. The controls themselves don’t interfere with MS AJAX di...

    2008-02-22 09:41:18

  • 在VS2003 IE7.0下调试asp.net权限问题的解决办法

    最近好不容易安装了IE7.0,欣喜若狂,但是在vs2003中调试asp.net时歇菜了,连续出现错误,在网上经过仔细查找,终于找到完美的解决办法. 首先将"http://localhost"添加到浏览器中的受信任站点区域(Tools--Internet Options--Scurity--Trusted sites--Sites),如果不添加将提...

    2008-02-22 09:41:17

  • 扩展 IronPython for ASP.NET:编写自定义属性注入器

    IronPython for ASP.NET 的属性注入器机制可以使得一些代码的语法变得简单(详细了解参考我的这一篇),但是默认的支持似乎现在还很不完备。 我反编译了 Microsoft.Web.IronPython.dll,在其中增加了对 RepeaterItem 和 Session (HttpSessionState) 的属性注入支持。...

    2008-02-22 09:41:15

  • 使用.NET 2.0中的秒表-Stopwatch类进行速度测试

    软件的运行速度必须要在用户可以接受的范围内。通常,改善那些短暂的但频繁使用的例程的速度会大幅度地提高软件的整体速度。 要改善速度,当然首先要能够量度时间。好,那我们考虑一下在跑道上的情况,枪声一响,马上按下秒表开始计时,在选手到达终点那一刻结束计时,...

    2008-02-22 09:41:15

2