上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 58 下一页
摘要: ASP.NET程序中常用编程代码1.为按钮添加确认对话框Button1.Attributes.Add("onclick","return confirm(’确认?’)");button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}")2.删除表格选定记录//获得DataGrid主键int intEmpID = (int)MyDataGrid.DataKeys[e.Item.Item 阅读全文
posted @ 2010-06-07 15:04 清山博客 阅读(166) 评论(0) 推荐(0)
摘要: 一、同步方式:1.服务器端 server.csusing System;using System.Net.Sockets;using System.Net;using System.IO;class ProgServeur { static readonly ushort port = 50000; static void Main() { IPAddress ipAddress = new IPAddress( new byte[] { 127, 0, 0, 1 } ); TcpListener tcpListener = new TcpListener( ... 阅读全文
posted @ 2010-05-02 20:54 清山博客 阅读(233) 评论(0) 推荐(1)
摘要: 如:根据123,可以写出:123,132,213,231,312,321种排列组合顺序。using System;using System.Collections; class Program { static void Main(string[] args) { Permutate("12345", "", 0); } static void Permutate(string str, string result, int length) { if (str.Length == length) { Console.Wri... 阅读全文
posted @ 2010-03-23 18:28 清山博客 阅读(1196) 评论(0) 推荐(0)
摘要: 设置SharpDevelop,使其能编写和运行Asp.net。在看下文的时候,请确定您的系统装上了IIS,FontPage扩展,装了.Net框架。好现在开始我的讲述。 如果您装的.Net框架是1.1版的,请生成以下BAT文件。 文件:Asp.Net_1.1_Setup.bat c: cd C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322 aspnet_regiis.exe -i aspnet_regiis.exe -lk pause ------------------------ 如果您装的.Net框架是2.0版的,请生成以下BAT文件。 文件:Asp 阅读全文
posted @ 2010-03-17 13:38 清山博客 阅读(474) 评论(0) 推荐(0)
摘要: 计算机端口 计算机“端口”是英文port的义译,可以认为是计算机与外界通讯交流的出口。其中硬件领域的端口又称接口,如:USB端口、串行端口等。软件领域的端口一般指网络中面向连接服务和无连接服务的通信协议端口,是一种抽象的软件结构,包括一些数据结构和I/O(基本输入输出)缓冲区。 按端口号可分为3大类: (1)公认端口(Well Known Ports):从0到1023,它们紧密绑定(binding)于一些服务。通常这些端口的通讯明确表明了某种服务的协议。例如:80端口实际上总是HTTP通讯。 (2)注册端口(Registered Ports):从1024到49151。它们松散地绑... 阅读全文
posted @ 2009-12-24 12:20 清山博客 阅读(835) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.Net;using System.Net.Sockets;using System.Threading;namespace PortScanner{ class Program { //已扫描端口数目 internal static int scannedCount = 0; //正在运行的线程数目 internal static int runningThreadCount = 0; //打开的端口数目 internal sta... 阅读全文
posted @ 2009-12-24 12:15 清山博客 阅读(525) 评论(0) 推荐(0)
摘要: SQL数据类型详解 (1)二进制数据类型 二进制数据包括 Binary、Varbinary 和 Image Binary 数据类型既可以是固定长度的(Binary),也可以是变长度的。 Binary[(n)] 是 n 位固定的二进制数据。其中,n 的取值范围是从 1 到 8000。其存储窨的大小是 n + 4 个字节。 Varbinary[(n)] 是 n 位变长度的二进制数据。其中,n 的取值范围是从 1 到 8000。其存储窨的大小是 n + 4个字节,不是n 个字节。 在 Image 数据类型中存储的数据是以位字符串存储的,不是由 SQL Server 解释的,必须由应用程序... 阅读全文
posted @ 2009-12-07 16:58 清山博客 阅读(184) 评论(0) 推荐(0)
摘要: public string ChangeDBTypeToCSharpType(string type) { string reval=string.Empty; switch(type.ToLower()) { case "int": reval= "int"; break; case "text": reval= "string"; break; case "bigint": reval= "long"; break; case "binary": re 阅读全文
posted @ 2009-12-07 16:55 清山博客 阅读(194) 评论(0) 推荐(0)
摘要: using System;using System.IO;using System.Text;using System.Security.Cryptography;namespace APress.ProAspNet.Utility{ public static class AsymmetricEncryptionUtility { //生成并保存密钥; public static string GenerateKey(string targetFile) { RSACryptoServiceProvider Al... 阅读全文
posted @ 2009-12-01 11:51 清山博客 阅读(215) 评论(0) 推荐(0)
摘要: 对象层次结构.NET Framework 安全系统实现可扩展模式的派生类继承。层次结构如下所示: 算法类型类,例如 SymmetricAlgorithm 或 HashAlgorithm。该级别为抽象。 从算法类型类继承的算法类,例如 RC2 或 SHA1。该级别为抽象。 从算法类继承的算法类的实现,例如 RC2CryptoServiceProvider 或 SHA1Managed。该级别是完全实现的。 使用这种模式的派生类,很容易添加新算法或现有算法的新实现。例如,若要创建新的公钥算法,则应从 AsymmetricAlgorithm 类继承。若要创建特定算法的新实现,应创建该算法的非抽象派生类 阅读全文
posted @ 2009-12-01 11:38 清山博客 阅读(270) 评论(1) 推荐(1)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 58 下一页