asp.net或javascript判断是否手机访问

//////判断手机用户UserAgent//////privateboolIsMobile(){HttpContextcontext=HttpContext.Current;if(context!=null){HttpRequestrequest=context.Request;i …… 阅读全文

使用微软URLRewriter.dll的url实现任意后缀名重写

~/product/([0-9]*)\.html ~/product.aspx?pid=$1 ~/product/([0-9]*)-([0-9]*)\.html ~/product.aspx?sid=$1&pid=$2 ~/product/([0-9] …… 阅读全文

C#调用存储过程带输出参数或返回值

CREATE PROCEDURE [dbo].[GetNameById] @studentid varchar(8), @studentname nvarchar(50) OUTPUTASBEGIN SELECT @studentname=studentname FROM student WHERE studentid=@studentid if @@Error<>0 RE …… 阅读全文

SerialPort如何读取串口数据并显示在TextBox上,多线程委托

/*SerialPort中串口数据的读取与写入有较大的不同。由于串口不知道数据何时到达,因此有两种方法可以实现串口数据的读取。一、线程实时读串口;二、事件触发方式实现。由于线程实时读串口的效率不是十分高效,因此比较好的方法是事件触发的方式。在SerialPort类中有DataReceived事件,当串口的读缓存有数据到达时则触发DataReceived事件,其中SerialPort.Recei …… 阅读全文

c#使用GDI+简单绘图

private void Form1_Paint(object sender, PaintEventArgs e){ Graphics g = e.Graphics; //创建画板,这里的画板是由Form提供的. Pen p = new Pen(Color.Blue, 2);//定义了一个蓝色,宽度为的画笔 g.DrawLine(p, 10, 10, 100, 100);//在画板上画直线 …… 阅读全文

ZPL条码打印类

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Diagnostics;using System.Drawing;using System.Drawing.Drawing2D;namespace Zebra …… 阅读全文