摘要:
名为Validate.js的javascirpt文件function checkData(){ var zip = document.getElementById("Zip").value if(/^[1-9]\d*$/.test(zip)) { } else { alert("You couldn't enter the letter!"); }} html端代码<html>&... 阅读全文
摘要:
什么是.net remoting?根据我的理解。.net remoting是客户端程序远程调用服务器端对象。 阅读全文
摘要:
怎样加密软件一般C/S架构的软件都分为客户端(Client)和服务器端(Server)两部分。而安装到客户机器上的软件,一般都只是客户端。所以我们只需要在服务器端添加一个验证表,在表中添加一个序列号字段。在客户端的第一次安装时,判断序列号是否存在于服务器端。而该验证可以使用web service。当然,如果出现网络不通情况该如何处理呢?你可以把序列号通过加密,保存到客户端本地文件中。然后除了第一次... 阅读全文
摘要:
首先要添加引用输入输出包using System.IO;StreamReadersr = File.OpenText(fileName);string str = sr.ReadLine(); 阅读全文
摘要:
public class Manage{//声明委托public delegate void EventHandler(string a);//声明事件public event EventHandler Change;public void RaiseEvent(string a){Change(a);}}public class Action{public staticvoid doA(){Co... 阅读全文
摘要:
privateclass Singleton{//把对象访问变成私有的,使外部调用只能通过公有方法private static Singleton _instance = new Singleton();//静态方法,使外部可以通过类名调用public static Singleton CreateInstance(){return _instance;}} 阅读全文
摘要:
//要先引用输入输出包using System.IO;//获取webservice所在的路径;string path = Server.MapPath("WSLicence.asmx");//截取文件夹路径string folderPath = path.Substring(0, path.LastIndexOf('\\'));string fileName = folderPath + "reg... 阅读全文
摘要:
//注意,要先引用加密包using System.Security.Cryptography;public string MD5Hasher(){//MD5加密方法只接受字节数组,故要先把字符串转化成字节数组byte[] MD5Data = System.Text.Encoding.UTF8.GetBytes(HashText);//实例化md5对象 MD5 Md5 = new MD5Crypto... 阅读全文
摘要:
怎样使用webservice? 1.创建webservice [WebMethod] public void Insert(string serial,string code,string key) {RDB.SQLDB sqlHelper = new RDB.SQLDB();sqlHelper.ExecuteSQL("insert into lic_detail(serial_number,ac... 阅读全文