随笔分类 -  Asp.net

摘要://#region 楼层情况 function Getlouceng(str) { var returnValue = ""; switch (str) { case "一": returnValue = "1"; break; case "二": returnValue = ... 阅读全文
posted @ 2018-06-14 10:12 你的斗志并没有失去 阅读(1601) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/DebugLZQ/archive/2012/11/07/2756997.html 阅读全文
posted @ 2018-05-31 11:21 你的斗志并没有失去 阅读(124) 评论(0) 推荐(0)
摘要:////1.正则表达式 ////标题 //var titleMc = Regex.Match(result, "c_333 f20\">(.*?)(.*万)"); //if (priceMc.Success) //{ // va... 阅读全文
posted @ 2018-05-28 15:46 你的斗志并没有失去 阅读(138) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/yukaizhao/archive/2011/07/25/xpath.html var result = GetStringByUrl(textBox1.Text.Trim()); HtmlAgilityPack.HtmlDocument doc = new HtmlAgilit... 阅读全文
posted @ 2018-05-28 15:44 你的斗志并没有失去 阅读(123) 评论(0) 推荐(0)
摘要:public static string GetStringByUrl(string url) { HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; request.Method = "GET"; request.Conte... 阅读全文
posted @ 2018-05-25 16:30 你的斗志并没有失去 阅读(110) 评论(0) 推荐(0)
摘要:int Currentpage = 1; int Pagesize = 2; //总条数 int totalRecord = Convert.ToInt32(DB.bBookDBEntities.Book.Count()); public void Data() { lblpa... 阅读全文
posted @ 2018-04-19 15:45 你的斗志并没有失去 阅读(111) 评论(0) 推荐(0)
摘要://先进行html加密 var text = $("#text").val(); text = encodeURIComponent(text); //后端存入数据库进行解密 string text = context.Server.UrlDecode(context.Request[... 阅读全文
posted @ 2018-04-17 10:39 你的斗志并没有失去 阅读(166) 评论(0) 推荐(0)
摘要:DateTime dtTime = Convert.ToDateTime(dt.Rows[0]["Newtime"]); lblDay1.Text = dtTime.Month.ToString(); lblYearMonth1.Text = dtTime.Year.ToString() + "-" + dtTime.Month.ToString(); ... 阅读全文
posted @ 2018-04-03 17:35 你的斗志并没有失去 阅读(109) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2018-04-02 09:21 你的斗志并没有失去 阅读(134) 评论(0) 推荐(0)
摘要:string sql = "select * from Users where UserName like '%'+@UserName+'%' or UserID like '%'+@UserID+'%'"; SqlParameter[] p = { new SqlParameter("@UserName", txt), ... 阅读全文
posted @ 2018-03-23 08:09 你的斗志并没有失去 阅读(168) 评论(0) 推荐(0)
摘要:在登录单击事件中写入Cookie 在加载事件中读取Cookie 在退出登录单击事件中删除Cookie HttpCookie hc = new HttpCookie("login"); //采用键值对的方式添加存储的信息 hc.Values.Add("Name", "jack"); //如果不设置过期时间则关闭浏览器时Cookie自动清... 阅读全文
posted @ 2018-03-22 09:24 你的斗志并没有失去 阅读(169) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2018-03-21 15:30 你的斗志并没有失去 阅读(165) 评论(0) 推荐(0)
摘要:用户名: *用户名不能为空 密 码: *密码不能为空 确认密... 阅读全文
posted @ 2018-03-21 10:08 你的斗志并没有失去 阅读(794) 评论(0) 推荐(0)
摘要:删除 删除 阅读全文
posted @ 2018-03-21 08:40 你的斗志并没有失去 阅读(142) 评论(0) 推荐(0)
摘要:最近测试一个百万级别的数据表的分页性能,需要在表中插入百万级别的测试数据,网上找到如下的方法: 1、首先创建student表 create table student ( sno int primary key identity(1,1) , sname VARCHAR(200) ) 2、--向数据库中插入100万条随机姓名记录用于测试 DECLARE @LN... 阅读全文
posted @ 2018-03-20 14:00 你的斗志并没有失去 阅读(396) 评论(0) 推荐(0)
摘要:... 阅读全文
posted @ 2018-03-20 10:26 你的斗志并没有失去 阅读(148) 评论(0) 推荐(0)
摘要:编号 姓名 ... 阅读全文
posted @ 2018-03-16 08:08 你的斗志并没有失去 阅读(198) 评论(0) 推荐(0)
摘要:using System; using System.Web; using System.Data; using System.Data.SqlClient; using System.Configuration; public class checkHandler : IHttpHandler { public void ProcessRequest(HttpContext c... 阅读全文
posted @ 2018-03-15 14:53 你的斗志并没有失去 阅读(384) 评论(0) 推荐(0)
摘要:<%@ WebHandler Language="C#" Class="FileHandler" %> using System; using System.Web; using System.IO; public class FileHandler : IHttpHandler { public 阅读全文
posted @ 2018-03-15 09:13 你的斗志并没有失去 阅读(441) 评论(0) 推荐(0)
摘要:protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { string filename = Path.GetExtension(FileUpload1.FileName); string... 阅读全文
posted @ 2018-03-14 09:56 你的斗志并没有失去 阅读(111) 评论(0) 推荐(0)