随笔分类 - C#
摘要://获取客户端、服务器、本地IP地址 public static string getIPAddress() { ////本地IP //string address = System.Net.Dns.GetHostAddress...
阅读全文
摘要://DataBackups文件夹,指在WEB页面根目录System.Web.HttpContext.Current.Server.MapPath("DataBackups");//../../DataBackups,指在web页面根目录往上两级的DataBackups文件夹System.Web.Ht...
阅读全文
摘要:1.//备份,@name地址,string strSql = @"declare @name varchar(250) set @name = 'D:\YZ_Backup\DataBackups\YZ_' + convert(varchar(50),getdate(),112)+'.bak' BAC...
阅读全文
摘要:indexOf()方法,查找某字符串在一个字符串内的位置,没有则返回-1string aa="abcdef";int a=aa.indexOf("bc");//a会等于1int b=aa.indexOf("a");//b会等于0int c=aa.indexOf("g");c会等于-1所以你只要判断返...
阅读全文
摘要://例子function demo($n){ if($n>1) { $n=$n*demo($n-1); } else { return 1; } return $n;}echo demo(10); 解答:递归其实就是“一个函数的自调用”在这个“自调用”的过程中...
阅读全文
摘要:Request、Request.Form和Request.QueryString的区别request本身是一个系统的静态对象,本身也可以作为数组调用,比如request("abc")就是获取request数组中键值"abc"对应的值,而这个数组又不是固定的,而是多个数组的集合,其中包含了(Query...
阅读全文
摘要:Ip获取//本机名string HostName= System.Net.Dns.GetHostName();//本机IPstring HostIP= System.Net.Dns.GetHostAddresses(HostName).GetValue(0).ToString(); //IP6 地址...
阅读全文
摘要://=====================================================================================// All Rights Reserved , Copyright © Learun 2013//=============...
阅读全文
摘要:WMS.Web.YZMManagement.YZMOrderControl.YZMOrderControl_List.aspx function ListGrid() { $("#Button1").click(); } 查询 ...
阅读全文
摘要:#region 数据分页 返回 DataTable /// /// 摘要: /// 数据分页 /// 参数: /// sql:传入要执行sql语句 /// param:参数化 ...
阅读全文
摘要:protected void Page_Load(object sender, EventArgs e) { int value = 0;//初始值 Test(ref value); Response.Write(val...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Text;using System.Reflection;using System.Data;using System.Collections;namespace DotNet.Ut...
阅读全文
摘要: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...
阅读全文
摘要:aspx 相关图片: --%> ...
阅读全文
摘要:#region ========加密======== /// /// 加密 /// /// /// public static string Encrypt(string Text) { return Encrypt(Text, "litianping"); } /// /// 加密数据 /// /// /// /// public static string Encrypt(string Text, string sKey) { DESCryptoServiceProvider des = new DESCryptoServiceProvider(); byte...
阅读全文

浙公网安备 33010602011771号