随笔分类 -  [02]asp.net

摘要:List<string> ipv4_ips = GetLocalIpAddress("InterNetwork"); /// <summary> /// 获取本机所有ip地址 /// </summary> /// <param name="netType">"InterNetwork":ipv4地址 阅读全文
posted @ 2021-11-17 15:40 Xyang 阅读(315) 评论(0) 推荐(0)
摘要:1.Web.config中httpRuntime maxRequestLength="1048576" 设置的大一点 2.修改IIS,如不方便可直接修改Web.config <system.webServer> <security> <requestFiltering> <requestLimits 阅读全文
posted @ 2020-07-15 12:31 Xyang 阅读(1089) 评论(0) 推荐(0)
摘要:1.缺少驱动或升级oledb驱动问题:安装 AccessDatabaseEngine_X64 或AccessDatabaseEngine修改数据链接 Provider=Microsoft.ACE.OLEDB.12.0; data source= ;Extended Properties='Excel 阅读全文
posted @ 2016-06-04 11:06 Xyang 阅读(170) 评论(0) 推荐(0)
摘要:1.引用jQuery及ajaxfileupload.js 2.js 3.html <input type="file" id="file1" onchange="ajaxFileUpload()" name="file" class="imgup" accept="image/*"/> 4.uplo 阅读全文
posted @ 2016-04-14 10:44 Xyang 阅读(1255) 评论(0) 推荐(0)
摘要:1.Windows Server 2003以上可直接升级framework 4.5及以上版本,重启后即可解决2.Windows Server 2003下安装补丁Fix_Net4.0_doPostBack.rar,VS下工具》程序包管理器》程序包管理器控制台 在下方命令行中输入install-pack... 阅读全文
posted @ 2015-12-25 18:13 Xyang 阅读(1030) 评论(0) 推荐(0)
摘要:... 阅读全文
posted @ 2015-08-06 16:19 Xyang 阅读(161) 评论(0) 推荐(0)
摘要:/// /// 查询EXCEL电子表格添加到DATASET /// /// 服务器路径 /// 表名 public DataSet ExecleDs(string filenameurl, string tab... 阅读全文
posted @ 2014-12-26 12:29 Xyang 阅读(172) 评论(0) 推荐(0)
摘要:IE10下调试会报javascript错误:Sys.WebForms.PageRequestManagerServerErrorExceptionScriptManager控件之后添加 阅读全文
posted @ 2014-09-09 12:08 Xyang 阅读(559) 评论(0) 推荐(0)
摘要:一.代码部分 public static void initJavascript() { HttpContext.Current.Response.Write(" "); HttpContext.Current.Response.Write("... 阅读全文
posted @ 2014-07-22 15:58 Xyang 阅读(7405) 评论(0) 推荐(0)
摘要:直接上方法 public static ArrayList getImgUrl(string html, string regstr, string keyname) { ArrayList resultStr = new ArrayList(); Regex r = new Regex(regstr, RegexOptions.IgnoreCase); MatchCollection mc = r.Matches(html); f... 阅读全文
posted @ 2014-02-17 15:27 Xyang 阅读(900) 评论(0) 推荐(0)
摘要:1.添加UrlRewriter.dll引用2.修改Web.config<configSections>节点下添加<section name="ReplaceUrl" type="URLRewriter.Config.UrlsSection, URLRewriter"/>根节点下添加 <ReplaceUrl> <urls> <add virtualUrl="~/about.html" destinationUrl="~/about.aspx"/> <a 阅读全文
posted @ 2013-05-24 17:49 Xyang 阅读(334) 评论(0) 推荐(0)
摘要:1.准备模板newsItem.html<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title></head><body> <h1>$Porschev[0]$</h1> <p& 阅读全文
posted @ 2013-05-24 15:45 Xyang 阅读(930) 评论(0) 推荐(1)
摘要:"^\d+$" //非负整数(正整数 + 0)"^[0-9]*[1-9][0-9]*$" //正整数"^((-\d+)|(0+))$" //非正整数(负整数 + 0)"^-[0-9]*[1-9][0-9]*$" //负整数"^-?\d+$" //整数"^\d+(\.\d+)?$" //非负浮点数(正浮点数 + 0)"^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]* 阅读全文
posted @ 2013-01-07 10:24 Xyang 阅读(132) 评论(0) 推荐(0)
摘要:1.将下载来的UEditor文件夹导入到所需项目中2.在页面中添加相关css\js引用<link rel="stylesheet" type="text/css" href="/UEditor/themes/default/ueditor.css" /> <script src="/UEditor/editor_config.js" type="text/javascript"></script> <script src="/UEditor/e 阅读全文
posted @ 2012-12-06 22:57 Xyang 阅读(449) 评论(0) 推荐(0)
摘要:/// <summary> /// 获取文中图片地址 /// </summary> /// <param name="content">内容</param> /// <returns>地址字符串</returns> public static string getImageUrl(string content) { int mouse = 0; int cat = 0; string imageLabel = ""; ... 阅读全文
posted @ 2012-06-13 10:37 Xyang 阅读(239) 评论(0) 推荐(0)
摘要:在<system.web>跟节点下设置<sessionState timeout="20" mode="InProc"></sessionState>timeout="20"20分钟后过期 阅读全文
posted @ 2012-06-12 14:02 Xyang 阅读(132) 评论(0) 推荐(0)
摘要:1.将DLL文件添加引用,将数据库文件qqwry.dat复制到网站相应目录中2.编写传人IP返回所在地的方法 public static string GetNameByIP(string strIP) { string strName = "未知区域"; if (!string.IsNullOrEmpty(strIP)) { try { System.Web.UI.Page page = new Sys... 阅读全文
posted @ 2012-06-12 13:54 Xyang 阅读(208) 评论(0) 推荐(0)
摘要:<%#Eval("news_time","{0:yyyy-MM-dd}") %><%#((DateTime)Eval("news_time")).ToString("yyyy-MM-dd") %> 阅读全文
posted @ 2012-05-02 10:58 Xyang 阅读(2799) 评论(0) 推荐(0)
摘要:1 通过HTTPCookies类进行创建创建Cookies:HttpCookie StudentCookies = new HttpCookie("StudentCookies");StudentCookies.Value = TextBox1.Text;StudentCookies.Expires = DateTime.Now.AddHours(1);Response.Cookies.Add(StudentCookies);读取Cookies:string roll = Request.Cookies["StudentCookies"].Value;2 阅读全文
posted @ 2012-04-23 17:53 Xyang 阅读(155) 评论(0) 推荐(0)
摘要:1.SET IDENTITY_INSERT [dbo].[QD_News] ON2.插入语句3.SET IDENTITY_INSERT [dbo].[QD_News] OFF 阅读全文
posted @ 2012-04-23 16:01 Xyang 阅读(242) 评论(0) 推荐(0)

hi