随笔分类 -  C#

摘要://获取客户端、服务器、本地IP地址 public static string getIPAddress() { ////本地IP //string address = System.Net.Dns.GetHostAddress... 阅读全文
posted @ 2014-06-25 11:42 lengv10 阅读(1277) 评论(0) 推荐(0)
摘要://DataBackups文件夹,指在WEB页面根目录System.Web.HttpContext.Current.Server.MapPath("DataBackups");//../../DataBackups,指在web页面根目录往上两级的DataBackups文件夹System.Web.Ht... 阅读全文
posted @ 2014-06-24 17:46 lengv10 阅读(263) 评论(0) 推荐(0)
摘要:1.//备份,@name地址,string strSql = @"declare @name varchar(250) set @name = 'D:\YZ_Backup\DataBackups\YZ_' + convert(varchar(50),getdate(),112)+'.bak' BAC... 阅读全文
posted @ 2014-06-21 17:55 lengv10 阅读(256) 评论(0) 推荐(0)
摘要:indexOf()方法,查找某字符串在一个字符串内的位置,没有则返回-1string aa="abcdef";int a=aa.indexOf("bc");//a会等于1int b=aa.indexOf("a");//b会等于0int c=aa.indexOf("g");c会等于-1所以你只要判断返... 阅读全文
posted @ 2014-06-19 16:45 lengv10 阅读(12005) 评论(0) 推荐(0)
摘要://例子function demo($n){ if($n>1) { $n=$n*demo($n-1); } else { return 1; } return $n;}echo demo(10); 解答:递归其实就是“一个函数的自调用”在这个“自调用”的过程中... 阅读全文
posted @ 2014-06-18 10:07 lengv10 阅读(494) 评论(0) 推荐(0)
摘要:Request、Request.Form和Request.QueryString的区别request本身是一个系统的静态对象,本身也可以作为数组调用,比如request("abc")就是获取request数组中键值"abc"对应的值,而这个数组又不是固定的,而是多个数组的集合,其中包含了(Query... 阅读全文
posted @ 2014-06-12 13:48 lengv10 阅读(194) 评论(0) 推荐(0)
摘要:Ip获取//本机名string HostName= System.Net.Dns.GetHostName();//本机IPstring HostIP= System.Net.Dns.GetHostAddresses(HostName).GetValue(0).ToString(); //IP6 地址... 阅读全文
posted @ 2014-06-10 08:50 lengv10 阅读(262) 评论(0) 推荐(0)
摘要://=====================================================================================// All Rights Reserved , Copyright © Learun 2013//=============... 阅读全文
posted @ 2014-06-09 09:05 lengv10 阅读(413) 评论(0) 推荐(0)
摘要:WMS.Web.YZMManagement.YZMOrderControl.YZMOrderControl_List.aspx function ListGrid() { $("#Button1").click(); } 查询 ... 阅读全文
posted @ 2014-05-10 18:00 lengv10 阅读(309) 评论(0) 推荐(0)
摘要:#region 数据分页 返回 DataTable /// /// 摘要: /// 数据分页 /// 参数: /// sql:传入要执行sql语句 /// param:参数化 ... 阅读全文
posted @ 2014-05-10 14:20 lengv10 阅读(417) 评论(0) 推荐(0)
摘要:protected void Page_Load(object sender, EventArgs e) { int value = 0;//初始值 Test(ref value); Response.Write(val... 阅读全文
posted @ 2014-05-10 14:13 lengv10 阅读(524) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Text;using System.Reflection;using System.Data;using System.Collections;namespace DotNet.Ut... 阅读全文
posted @ 2014-04-15 11:53 lengv10 阅读(936) 评论(0) 推荐(0)
摘要:using DotNet.Utilities;//类中写入 string guid = CommonHelper.GetGuid;using System;namespace DotNet.Utilities{public class CommonHelper{#region "全球唯一码GUID" /// /// 获取一个全球唯一码GUID字符串 /// public static string GetGuid { get { return Gu... 阅读全文
posted @ 2014-04-09 14:05 lengv10 阅读(690) 评论(0) 推荐(0)
摘要:aspx 相关图片: --%> ... 阅读全文
posted @ 2014-04-08 22:03 lengv10 阅读(472) 评论(0) 推荐(0)
摘要:#region ========加密======== /// /// 加密 /// /// /// public static string Encrypt(string Text) { return Encrypt(Text, "litianping"); } /// /// 加密数据 /// /// /// /// public static string Encrypt(string Text, string sKey) { DESCryptoServiceProvider des = new DESCryptoServiceProvider(); byte... 阅读全文
posted @ 2014-04-08 10:54 lengv10 阅读(211) 评论(0) 推荐(0)