随笔分类 - Asp.net
摘要://#region 楼层情况 function Getlouceng(str) { var returnValue = ""; switch (str) { case "一": returnValue = "1"; break; case "二": returnValue = ...
阅读全文
摘要:http://www.cnblogs.com/DebugLZQ/archive/2012/11/07/2756997.html
阅读全文
摘要:////1.正则表达式 ////标题 //var titleMc = Regex.Match(result, "c_333 f20\">(.*?)(.*万)"); //if (priceMc.Success) //{ // va...
阅读全文
摘要:https://www.cnblogs.com/yukaizhao/archive/2011/07/25/xpath.html var result = GetStringByUrl(textBox1.Text.Trim()); HtmlAgilityPack.HtmlDocument doc = new HtmlAgilit...
阅读全文
摘要:public static string GetStringByUrl(string url) { HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; request.Method = "GET"; request.Conte...
阅读全文
摘要:int Currentpage = 1; int Pagesize = 2; //总条数 int totalRecord = Convert.ToInt32(DB.bBookDBEntities.Book.Count()); public void Data() { lblpa...
阅读全文
摘要://先进行html加密 var text = $("#text").val(); text = encodeURIComponent(text); //后端存入数据库进行解密 string text = context.Server.UrlDecode(context.Request[...
阅读全文
摘要:DateTime dtTime = Convert.ToDateTime(dt.Rows[0]["Newtime"]); lblDay1.Text = dtTime.Month.ToString(); lblYearMonth1.Text = dtTime.Year.ToString() + "-" + dtTime.Month.ToString(); ...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Web; /// /// Md5 的摘要说明 /// public class Md5 { public static string GetMD5(st...
阅读全文
摘要:string sql = "select * from Users where UserName like '%'+@UserName+'%' or UserID like '%'+@UserID+'%'"; SqlParameter[] p = { new SqlParameter("@UserName", txt), ...
阅读全文
摘要:在登录单击事件中写入Cookie 在加载事件中读取Cookie 在退出登录单击事件中删除Cookie HttpCookie hc = new HttpCookie("login"); //采用键值对的方式添加存储的信息 hc.Values.Add("Name", "jack"); //如果不设置过期时间则关闭浏览器时Cookie自动清...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System...
阅读全文
摘要:用户名: *用户名不能为空 密 码: *密码不能为空 确认密...
阅读全文
摘要:最近测试一个百万级别的数据表的分页性能,需要在表中插入百万级别的测试数据,网上找到如下的方法: 1、首先创建student表 create table student ( sno int primary key identity(1,1) , sname VARCHAR(200) ) 2、--向数据库中插入100万条随机姓名记录用于测试 DECLARE @LN...
阅读全文
摘要:using System; using System.Web; using System.Data; using System.Data.SqlClient; using System.Configuration; public class checkHandler : IHttpHandler { public void ProcessRequest(HttpContext c...
阅读全文
摘要:<%@ WebHandler Language="C#" Class="FileHandler" %> using System; using System.Web; using System.IO; public class FileHandler : IHttpHandler { public
阅读全文
摘要:protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { string filename = Path.GetExtension(FileUpload1.FileName); string...
阅读全文

浙公网安备 33010602011771号