`
邪神Saber
  • 浏览: 41241 次
文章分类
社区版块
存档分类
最新评论
文章列表
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace Util { public class RegexUtil { private RegexUtil() { } private static RegexUtil instance = null; /// ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Util { public class MD5 { public static string MD5Encrypt(string str) { return MD5Encrypt(str, 16); } public static string MD5Encrypt(string strSource, ...
配置文件中的URL配置 <appSettings> <add key="rootURL" value="http://192.168.0.150:51898/"/> </appSettings> 正则替换的方法 public string changeURL(object url) { string oldURL = Convert.ToString(url); string rootAppURL = System.Configuration.Co ...
using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Drawing; using System.Drawing.Drawing2D; //在System.Drawing.dll中 using System.Drawing.Imaging; //在System.Drawing.dll中 namespace Util { public class ImageUtil { #region 正方型裁剪并缩放 ...
封装好的对象: var Ajax = function (sUrl, sMethod, oParam, fCallback) { this.sUrl = sUrl; this.sMethod = sMethod; this.oParam = oParam; this.fCallback = fCallback; this.status = { 1: '请求成功', 2: 'http返回失败', 3: '数据加载中' } this.xmlHttp = null; //驱动函数 ...
var xmlhttp = null; function myajax() { //1、创建XMLHttpRequest对象 //2、需要针对IE和其它浏览器建立这个对象的不同方式写不同的代码 if (window.XMLHttpRequest) { //针对FF,Mozilar,Opera,Safari,IE7,IE8 xmlhttp = new XMLHttpRequest(); //修正某些浏览器bug if (xmlhttp.overrideMimeType) { xmlhtt ...
public static string GetRootURI() { string AppPath = ""; HttpContext HttpCurrent = HttpContext.Current; HttpRequest Req; if (HttpCurrent != null) { Req = HttpCurrent.Request; string UrlAuthority = Req.Url.GetLeftPart(UriPa ...
页面后台cs文件的相对网站根目录的路径/view/Atlas string rootPath1= Server.MapPath("~"); string rootPath2 = Request.ApplicationPath; string path1 = Server.MapPath("upload"); string path2 = Server.MapPath(""); string path3 = Server.MapPath("."); string path4 = Server.MapPath(&quo ...
打开[我的文档]\IISExpress\config\applicationhost.config 找到下面的代码块 在 <bindings></bindings>中仿照 <binding protocol="http" bindingInformation="*:51898:localhost" /> 把localhost改为你的ip地址,改完后效果如下: <site name="Web" id="13"> <applicatio ...
后台添加Confirm for (int i = 0; i < GridView1.Rows.Count; i++) { LinkButton LinkDel = (LinkButton)GridView1.Rows[i].FindControl("LinkDel"); LinkDel.Attributes.Add("onclick", "return confirm('你要执行这个操作吗?');"); } 全 ...
一般弹窗 Page.ClientScript.RegisterStartupScript(this.GetType(), "message", "alert('确定删除吗')", true);第一个参数不会变, 第二个参数是键值的意思,如果只有一个弹出对话框的语句可以不写,多个的话,最好写上,名字自己定义,不能同名 第三个参数是js代码的内容,可以是已定义方法的方法名 第四个参数如果为true的话,那么第三个参数就可以不用加<script></script>标签了,如果为false 则必需加上 或者直接在页面上写入 ...
Json.NET Json.NET下载地址:http://json.codeplex.com/ ①添加引用 using Newtonsoft.Json;②调用方法 string jsonStr = JsonConvert.SerializeObject(list); LitJSON 下载LitJSON 添加DLL ①添加引用 using LitJson;②使用方法 JsonMapper.ToJson(list)
方法一: 添加引用 using System.Globalization; using System.Threading; 应用代码: CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture; TextInfo textInfo = cultureInfo.TextInfo; Console.WriteLine(textInfo.ToTitleCase("abc")); Console.Read(); 方法二: String className = "tb_adas ...
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace cfzs.DAL { public class BaseDAL { #region DataTale转为实体列表 /// <summary> /// DataTale转为实体列表 ...
using System; using System.Collections.Generic; using System.Text; using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.Net; using System.IO; namespace Util { /// <summary> /// 有关HTTP请求的辅助类 /// </summary> public class Ht ...
Global site tag (gtag.js) - Google Analytics