徐驰

导航

2015年9月16日 #

System.Web.Mvc.UrlHelper的学习与使用

摘要: 我们学习一下UrlHelper帮助类,看类名也都知道这个类是用来帮我们生成URL在ASP.NET MVC应用程序中。让我们来看看该类给我们带来了哪些方便的方法和属性,UrlHelper提供了四个非常常用的四个方法,1.Action方法通过提供Controller,Action和各种参数生成一个URL... 阅读全文

posted @ 2015-09-16 11:30 徐驰 阅读(233) 评论(0) 推荐(0) 编辑

MVC4相关Razor语法浅谈

摘要: 1、_LayOut.cshtml 文件为mvc的布局文件,里面包函的是htm的静态文件,作为mvc其他view的基础母版使用,子视图要不想想调用它只需在页面设置@{Layout=null;}即可,现对于里面的一些语法进行说明: @RenderBody()对于所有的页面默认的情况下都会使用这个布局(... 阅读全文

posted @ 2015-09-16 11:13 徐驰 阅读(921) 评论(0) 推荐(0) 编辑

2013年8月7日 #

js生成验证码并检验

摘要: 验证码js代码varcode;//在全局定义验证码 //产生验证码 window.onload=functioncreateCode(){code="";varcodeLength=4;//验证码的长度 varcheckCode=document.getElementById("code");varrandom=newArray(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H' 阅读全文

posted @ 2013-08-07 11:07 徐驰 阅读(359) 评论(0) 推荐(0) 编辑

2011年12月26日 #

c# 更换桌面壁纸

摘要: public class WinAPI { [DllImport("user32.dll", EntryPoint = "SystemParametersInfo")] public static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni); } private void changeImg() { string bmpPath = @"C:\Documents and Settings\Administrator 阅读全文

posted @ 2011-12-26 18:27 徐驰 阅读(1808) 评论(0) 推荐(0) 编辑

2011年12月19日 #

DirectX录音

摘要: .需要引用的程序集using System; using System.Windows.Forms; using System.Threading; using System.IO;using Microsoft.DirectX; using Microsoft.DirectX.DirectSound;2. SoundRecord的成员数据public const int cNotifyNum = 16; // 缓冲队列的数目private int mNextCaptureOffset = 0; // 该次录音缓冲区的起始点private int mSampleCount = 0; // 录制 阅读全文

posted @ 2011-12-19 12:52 徐驰 阅读(382) 评论(0) 推荐(0) 编辑

2011年12月15日 #

sqlHelper

摘要: // ===============================================================================// Microsoft Data Access Application Block for .NET// http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp//// SQLHelper.cs//// This file contains the implementations of the SqlHelper and SqlHelperParameterCa 阅读全文

posted @ 2011-12-15 12:11 徐驰 阅读(217) 评论(0) 推荐(0) 编辑

c# 开机自动启动

摘要: /// <summary> /// 自动启动设置 /// </summary> /// <param name="started">标记是否自动启动</param> /// <param name="name">程序名称</param> /// <param name="path">程序所在路径</param> public void AutoRunWhenStart(bool started, string name, string pa 阅读全文

posted @ 2011-12-15 12:10 徐驰 阅读(633) 评论(1) 推荐(1) 编辑

c# 发邮件

摘要: /// <param name="smtp">发件服务器</param> /// <param name="pwd">发件人密码</param> /// <param name="sendMail">发件人邮箱</param> /// <param name="recipientMail">收件人邮箱</param> /// <param name="sendUsername">发送人姓名 阅读全文

posted @ 2011-12-15 12:06 徐驰 阅读(363) 评论(1) 推荐(0) 编辑

c# 加密解密算法

摘要: #region DES 加密解密 /// <summary> /// DES 加密(数据加密标准,速度较快,适用于加密大量数据的场合) /// </summary> /// <param name="EncryptString">待加密的密文</param> /// <param name="EncryptKey">加密的密钥</param> /// <returns>returns</returns> public string DESEncrypt(str 阅读全文

posted @ 2011-12-15 12:05 徐驰 阅读(560) 评论(0) 推荐(0) 编辑

2011年6月9日 #

xml的几种用法方法

摘要: 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.WebControls;using System.Web.UI.HtmlControls;using System.Xml;private XmlDocument xmlDoc; //load xml file pr 阅读全文

posted @ 2011-06-09 13:32 徐驰 阅读(340) 评论(0) 推荐(0) 编辑