`
文章列表
1. RequiredFieldValidator 控件可确保用户提供有效的输入,即非空验证        属性                             说明 ControlToValidate             要验证控件的ID,所有验证控件都有该属性 Text             ...
/**//** *本日历选择控件由tiannet根据前人经验完善而得。大部分代码来自meizz的日历控件。 *tiannet添加了时间选择功能、select,object标签隐藏功能,还有其它小功能。 *使用方法: * (1)只选择日期 <input type="text" name="date" readOnly onClick="setDay(this);"> * (2)选择日期和小时 <input type="text" name="dateh" read ...
/**//** *本日历选择控件由tiannet根据前人经验完善而得。大部分代码来自meizz的日历控件。 *tiannet添加了时间选择功能、select,object标签隐藏功能,还有其它小功能。 *使用方法: * (1)只选择日期 <input type="text" name="date" readOnly onClick="setDay(this);"> * (2)选择日期和小时 <input type="text" name="dateh" read ...
parseFloat 转换成浮点数parseInt 转换成整数.这两个函数都有些容错性的,比如"123abc"会变成123.如果楼主希望更准确一些,其实可以判断一下,然后用eval,像这样不过也可以使用这样的方法:var a = "234" ;a = a.replace(/(^[\\s]*)|([\\s]*$)/g, "");if( a !="" && !isNaN( a ) ){//如果是数字a = eval( a )}else{//如果不是数字a = null}javascript有两种数据类型的 ...
经常有人请我指导应该如何动态地“重写”URL,以在他们的ASP.NETweb应用中发布比较干净的URL端点。这个博客帖子概述了几个方法,你可以用来在ASP.NET中干净地映射或重写URL,以及按照你自己的需求组织你的URL的结构。 为什么URL映射和重写很重要? 下面是开发人员想要对URL有更大的灵活性的最常见的场景: 1) 处理这样的情形:你要更改你的web应用中网页的结构,但你同时也要确保在你移动网页后,那些被人收藏的老URL不会成为死链接。重写URL允许你透明地将请求转交到新的网页地址而不出错。 2) 在象Google,Yahoo 和 Live 这样的搜索引擎中提高你网站上网 ...

XML操作

    博客分类:
  • .Net
/*******************************************************************/ //写入Xml 元素 string xmlFilePath = this.Server.MapPath("BookStore.xml"); //Xml 文件路径 XmlDocument xmlDoc = new XmlDocument(); //创建对象 xmlDoc.Load(xmlFilePath); //加载 XML 文件 XmlNode xmlNode = xml ...

线程操作

    博客分类:
  • .Net
using System; using System.Collections.Generic; using System.Text; using System.Threading; namespace Test { public class Program { static void Main(string[] args) { Console.WriteLine("Thread Start/Stop/Join Sample"); Al ...

checked和unchecked

    博客分类:
  • .Net
using System; using System.Collections.Generic; using System.Text; namespace Test { public class Program { static short x = 32767; static short y = 32767; //检查溢出 public static int F() { int z = checked((short)(x + y)); ...

c#索引指示器

    博客分类:
  • .Net
using System; using System.Collections.Generic; using System.Text; namespace Test { public class Program { private int[] mydata; public Program(int size) { mydata = new int[size]; for (int i = 0; i < size; i++) { ...
  using System; using System.Collections.Generic; using System.Text; namespace Test { public class Program { static void Main(string[] args) { //静态域访问 :Classname.Field Console.WriteLine(MyClass.j); //实例域访问:Create a class objce ...
所谓泛型,即通过参数化类型来实现在同一份代码上操作多种数据类型,泛型编程是一种编程范式,它利用“参数化类型”将类型抽象化,从而实现更为灵活的复用。C#泛型赋予了代码更强的类型安全,更好的复用,更高的效率 ...
Global site tag (gtag.js) - Google Analytics