10 2006 档案

摘要:DEMO1: 当前时间: DEMO2: 测试 阅读全文
posted @ 2006-10-31 20:56 RobotTech 阅读(19140) 评论(0) 推荐(0)
摘要:有时候我们需要保存一些binary data进数据库。SQL Server提供一个叫做image的特殊数据类型供我们保存binary data。Binary data可以是图片、文档等。在这篇文章中我们将看到如何在SQL Server中保存和输出图片。 建表 为了试验这个例子你需要一个含有数据的table(你可以在现在的库中创建它,也可以创建一个新的数据库),下面是它的结构: ... 阅读全文
posted @ 2006-10-26 11:27 RobotTech 阅读(775) 评论(0) 推荐(0)
摘要:在程序中怎么实现事件。要明白事件,首先要知道什么是委托。在C#中委托允许开发人员将一个对象中的方法传递给另一个能调用该方法的类的某个对象。比如:可以将类AC中的一个方法ADD[前 提是这个方法以被包含在某个委托中了]传递给另一个类WMS。此时类WMS就能调用类AC中的ADD了。当然不 管你是以什么方式实现方法的传递了,可以是静态的,也可以是实例化的。。要实现一个委托,需要按照 这样的不揍:A:申明... 阅读全文
posted @ 2006-10-26 11:04 RobotTech 阅读(233) 评论(0) 推荐(0)
摘要:SQL Server 2005http://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/consyscourse/SQLServer2005.aspxAjax与Atlas开发系列课程http://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/cons... 阅读全文
posted @ 2006-10-24 11:32 RobotTech 阅读(331) 评论(0) 推荐(0)
摘要:方法一://建立StreamWriter为写做准备 StreamWriter rw = File.CreateText(Server.MapPath(".")+"\\CreateText.txt"); //使用WriteLine写入内容 rw.WriteLine("使用File.CreateText 方法"); rw.WriteLine("返回StreamWriter流,利用这个流... 阅读全文
posted @ 2006-10-23 15:11 RobotTech 阅读(1981) 评论(0) 推荐(0)
摘要://建立两个FileStream对象 FileStream fsOF = new FileStream(OriginFile,FileMode.Open,FileAccess.Read); FileStream fsNF = new FileStream(NewFile,FileMode.Create,FileAccess.Write); //建立分别建立一个读写类 Binary... 阅读全文
posted @ 2006-10-23 15:09 RobotTech 阅读(1223) 评论(0) 推荐(0)
摘要:FileInfo fi; DirectoryInfo di; TableCell td; TableRow tr; /* 设定Table中的数据 首先搞定第一行 */ tr = new TableRow(); td = new TableCell(); td.Controls.Add(new LiteralControl("")); tr.Ce... 阅读全文
posted @ 2006-10-23 15:07 RobotTech 阅读(459) 评论(0) 推荐(0)
摘要:ASPX: 使用全站点计数器 全站点计数器 GlobCount.inc: 阅读全文
posted @ 2006-10-23 13:22 RobotTech 阅读(354) 评论(0) 推荐(0)
摘要:存储Image到XML:Byte[] FileByteArray = new Byte[FileLength]; //图象文件临时储存Byte数组 Stream StreamObject = loFile.PostedFile.InputStream; //建立数据流对像 //读取图象文件数据,FileByteArray为数据储存体,0为数据指针位置、FileLnegth为数据长度 ... 阅读全文
posted @ 2006-10-23 12:57 RobotTech 阅读(1075) 评论(0) 推荐(0)
摘要:private void Page_Load(object sender, System.EventArgs e) { FileStream stream = new FileStream(Server.MapPath("people.xml"), FileMode.Open); //创建XmlValidatingReader类的对象 XmlValidatingReader vr =... 阅读全文
posted @ 2006-10-23 12:51 RobotTech 阅读(349) 评论(0) 推荐(0)
摘要:static void WriteXMLbyXmlWriter(XmlWriter writer, string symbol, double price, double change, long volume) { writer.WriteStartElement("Stock"); writer.WriteAttributeString("Symbol", symbol); wr... 阅读全文
posted @ 2006-10-23 10:35 RobotTech 阅读(582) 评论(0) 推荐(0)
摘要:// 创建XmlDocument类的实例 XmlDocument doc = new XmlDocument(); ArrayList NodeValues = new ArrayList(); // 把people.xml文件读入内存,形成一个DOM结构 doc.Load( Server.MapPath("people.xml") ); XmlNode root = doc.... 阅读全文
posted @ 2006-10-23 10:27 RobotTech 阅读(332) 评论(0) 推荐(0)
摘要:在C#.net中操作XML //================================================================================== 在C#.net中如何操作XML需要添加的命名空间:using System.Xml; 定义几个公共对象:XmlDocument xmldoc ;XmlNode xmlnode ;XmlElement x... 阅读全文
posted @ 2006-10-21 23:14 RobotTech 阅读(353) 评论(0) 推荐(0)
摘要:在C#中操作XML已知有一个XML文件(bookstore.xml)如下: Oberon's Legacy Corets, Eva 5.95 1、往节点中插入一个节点: XmlDocument xmlDoc=new XmlDocument(); xmlDoc.Load("bookstore.xml"); XmlNode root=xmlDoc.Sel... 阅读全文
posted @ 2006-10-21 23:05 RobotTech 阅读(201) 评论(0) 推荐(0)
摘要:1、DateTime 数字型 System.DateTime currentTime=new System.DateTime( ); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 int 日=curr... 阅读全文
posted @ 2006-10-21 23:04 RobotTech 阅读(310) 评论(0) 推荐(0)
摘要:MyFirstAjax.htm:My First Ajax data.xml: 南京 苏州 无锡 常州 镇江 南通 扬州 徐州 杭州 宁波 温州 绍兴 嘉兴 湖州 福州 厦门 广州 深圳 东莞 珠海 济南 青岛 威海 烟台 阅读全文
posted @ 2006-10-21 21:28 RobotTech 阅读(266) 评论(0) 推荐(0)
摘要:读取:XmlDocument source = new XmlDocument(); XmlNode objnode; int i; string title,href; //载入新闻列表的XML文件 source.Load(Server.MapPath("contents.xml")); objnode=source.SelectSingleNode("topiclist... 阅读全文
posted @ 2006-10-20 15:58 RobotTech 阅读(439) 评论(1) 推荐(0)
摘要:protected void Application_Start(Object sender, EventArgs e) { StreamReader rd = new StreamReader(Server.MapPath("counter.txt")); int nNum = int.Parse(rd.ReadLine()); Application.Lock(); ... 阅读全文
posted @ 2006-10-20 14:18 RobotTech 阅读(648) 评论(0) 推荐(1)
摘要:/// /// 将整个文件夹复制到目标文件夹中。 /// /// 源文件夹 /// 目标文件夹 public static void CopyDir(string srcPath,string aimPath) { try { // 检查目标目录是否以目录分割字符结束如果不是则添加之 if(aimPath[aimPath.Length-1] != Path... 阅读全文
posted @ 2006-10-20 11:51 RobotTech 阅读(1301) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2006-10-19 14:59 RobotTech 阅读(190) 评论(0) 推荐(0)
摘要:Page_Load: If Not Page.IsPostBack Then '--------------------------下面的是错误的 如果2006-10-31 那么-1月 就是 2006-9-31 所以是错误的 Dim year, month, day As Integer day = Now.Day ... 阅读全文
posted @ 2006-10-19 14:53 RobotTech 阅读(772) 评论(0) 推荐(0)
摘要:Dim SMS_UploadFiles_Path As String = System.Configuration.ConfigurationSettings.AppSettings("SMS_UploadFiles_Path") 'Dim mPath As String = Server.MapPath(SMS_UploadFiles_Path) + "\" ... 阅读全文
posted @ 2006-10-19 14:43 RobotTech 阅读(6734) 评论(27) 推荐(0)
摘要:复制文件:FileInfo fiMyfile = new FileInfo(@"C:\123\456.txt"); if(fiMyfile.Exists) { fiMyfile.CopyTo(@"D:\123\456.txt", true); } 删除文件:FileInfo fiMyfile = new FileInfo(@"C:\123\456... 阅读全文
posted @ 2006-10-19 14:39 RobotTech 阅读(1995) 评论(1) 推荐(0)
摘要:从数据库中读取:方法一:SqlCommand Cmd = new SqlCommand("SELECT * FROM student", MyCn);SqlDataAdapter da = new SqlDataAdapter(Cmd);DataSet ds = new DataSet();da.Fill(ds, "student");Byte[] byteBLOBData = new Byte... 阅读全文
posted @ 2006-10-18 21:35 RobotTech 阅读(366) 评论(0) 推荐(0)
摘要:How to use the MQ?===================================================================================Here is an example to use the MQ: using System;using System.Messaging;using System.Drawing;using Sy... 阅读全文
posted @ 2006-10-17 10:32 RobotTech 阅读(255) 评论(0) 推荐(0)
摘要:MSMQ(MicroSoft Message Queue,微软消息队列)是在多个不同的应用之间实现相互通信的一种异步传输模式,相互通信的应用可以分布于同一台机器上,也可以分布于相连的网络空间中的任一位置。它的实现原理是:消息的发送者把自己想要发送的信息放入一个容器中(我们称之为Message),然后把它保存至一个系统公用空间的消息队列(Message Queue)中;本地或者是异地的消息接收程序再... 阅读全文
posted @ 2006-10-17 10:15 RobotTech 阅读(1039) 评论(0) 推荐(0)
摘要:default.aspx 代码: WebForm2 default.aspx.cs代码: using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;usi... 阅读全文
posted @ 2006-10-11 14:20 RobotTech 阅读(457) 评论(0) 推荐(0)
摘要:主要的不同之处在于当使用Session.Abandon时,会调用Session_End方法(InProc模式下)。当下一个请求到来时将激发Session_Start方法。而Session.Clear只是清除Session中的所有数据并不会中止该Session,因此也不会调用那些方法。 阅读全文
posted @ 2006-10-11 14:19 RobotTech 阅读(420) 评论(0) 推荐(0)
摘要:using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebContr... 阅读全文
posted @ 2006-10-11 14:19 RobotTech 阅读(322) 评论(0) 推荐(0)
摘要:<?xml version="1.0" encoding="utf-8" ?><configuration> <appSettings><add key="SMS_UploadFiles_Path" value="E:\SMS_UploadFiles\" /><add key="ConnectionString" value="Provider=SQLOLEDB.1;Persist Security Info=False;User 阅读全文
posted @ 2006-10-11 14:14 RobotTech 阅读(316) 评论(0) 推荐(0)
摘要:using System;using System.Text;using System.Text.RegularExpressions; namespace text_CS{ /// /// UBB 的摘要说明。 /// public class UBB { public UBB() { // // TODO: 在此处添加构造函数逻辑 // } #region 公共... 阅读全文
posted @ 2006-10-11 14:13 RobotTech 阅读(461) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2006-10-11 14:09 RobotTech 阅读(1694) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示