
.net C# 类
xiaoding133
My name is Ma dingding. I’m a student, and software cultivator living in NanJing. This is my software development blog. I also study the aspect of speech recognition.If you are on Weibo,you can follow me at @xiaoding133.
展开
-
加密解密函数
<br />using System;<br />using System.IO;<br />using System.Security.Cryptography;<br />using System.Text;<br />namespace VISS.DataOperator<br />{<br /> class DES_<br /> {<br /> private static DES mydes=new DESCryptoServiceProvider();<br />原创 2010-07-09 17:26:00 · 941 阅读 · 0 评论 -
C#获取用户系统信息的程序
介绍在这个程序当中,主要通过下面两个类获取用户系统的信息:System.EnvironmentSystem.Managememnt应用程序包括三个tab菜单,分别是:SystemCPULocal drives程序外观如下图: 在 System 菜单中,用 System.Environment 类来获取系统信息 : private string原创 2012-08-22 16:14:42 · 3595 阅读 · 0 评论 -
用JQuery在客户端调用C#后台函数
建立一个页面叫Test.aspx, 在Test.aspx.cs文件中有如下函数:private void DeleteRec(){ int ID= Request.Form["ID"].ToString().ToInteger(); //客户端发过来的参数原创 2011-09-21 18:12:27 · 2140 阅读 · 0 评论 -
清除一个页面中所有TextBox的值
protected void Button2_Click(object sender, EventArgs e){ ClearInputs(Page.Controls);}void ClearInputs(ControlCollection ctrls){翻译 2011-09-21 17:50:29 · 933 阅读 · 0 评论 -
让RadioButtonList 像Tab菜单控件一样显示
引用的CSS.radiobuttonlist{ font: 12px Verdana, sans-serif; color: #000; /* non selected color */} .radiobuttonlist input{翻译 2011-08-17 12:23:04 · 1644 阅读 · 0 评论 -
为表单设置默认按钮
function SetDefalutButton(e, buttonid){ var evt = e ? e : window.event; if (evt.keyCode == 13)/*Search if user hit enter key*/翻译 2011-08-03 13:09:25 · 801 阅读 · 0 评论 -
把List数据转换成DataTable
public static class ExtensionMethods { /// /// Converts a List to a datatable /// ///转载 2011-08-03 13:01:08 · 1143 阅读 · 0 评论 -
间隔一段时间实现页面跳转
脚本: setTimeout( 'window.location = "default.aspx";', 3000 ); 第二种方法:META HTTP-EQUIV="Refresh" CONTENT="10;URL=http://www.yourdomai原创 2011-08-13 23:11:55 · 980 阅读 · 0 评论 -
用hyperlink实现文件下载
需要建立l两个页面link.aspx 和downloading.aspx,其中link.aspx 为前台显示的链接,downloading.aspx为后台下载处理页面。 link.aspx:using System.IO; protected void原创 2011-08-13 22:24:52 · 2817 阅读 · 0 评论 -
Jquery gridView分页
后台程序using System;using System.Web;using System.Data;using Tools;using BLL;public class handler : IHttpHandler { BLLCo原创 2011-08-07 12:19:13 · 1548 阅读 · 0 评论 -
不用C#中提供的函数将字符串翻转
class ReverseString{ public static void Main(string[] args) { string Name = "He is palying in a ground."; char[] ch原创 2011-08-03 13:05:49 · 776 阅读 · 0 评论 -
把GridView中选中的行导出为Excel文件
01 DataTable dt = new DataTable();02 dt.Columns.Add("empid");03 dt.Columns.Add("empname");04 foreach (GridViewRow row in GridView1.Row转载 2011-08-03 12:20:52 · 1904 阅读 · 2 评论 -
验证码实现。。。。
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.We原创 2010-05-15 09:57:00 · 494 阅读 · 0 评论 -
无边框窗体移动实现方法
在类中定义两个变量 private Point mouseOffset; //记录鼠标指针的坐标 private bool isMouseDown = false; //记录鼠标按键是否按下 增加鼠标按下的事件private void Main_MouseDown(object sender, MouseEventArgs e) {原创 2010-05-15 17:49:00 · 693 阅读 · 0 评论 -
批量插入数据到数据库SQL Server2000
private DataTable getTableStruct(string tablename,string conn) { string sql = string.Format(@"Select top 1 {0} from {1} Where 1=0", GetFieldName(), tablename);原创 2010-07-09 17:16:00 · 1798 阅读 · 0 评论