摘要: 原文链接:http://dev.mjxy.cn/a-480.aspx单击行展开,在单击行的时候隐藏<html xmlns="http://www.w3.org/1999/xhtml" ><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"/><title>#</title><script src="http://ajax.googleapis.com/ajax/lib 阅读全文
posted @ 2011-07-08 17:18 敏捷学院 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://dev.mjxy.cn/a-JQuery-Operation-Selected.aspx/* 002文件名:jquery.liu.select.js 003功能说明:本js文件为jquery类库的一个插件,主要实现对select的操作. 004作者:John Liu 005编写日期:2008/03/12 006*/007//得到select项的个数 008jQuery.fn.size = function(){ 009return jQuery(this).get(0).options.length; 010} 011012//获得选中项的索引 013jQuery.fn 阅读全文
posted @ 2011-07-08 17:16 敏捷学院 阅读(643) 评论(0) 推荐(0) 编辑
摘要: 原文链接: http://dev.mjxy.cn/a-Form-validation-using-JQuery.aspx$(document).ready(function () { 002003/* 设置默认属性 */004$.validator.setDefaults({ 005submitHandler: function (form) { form.submit(); } 006}); 007// 中文字两个字节 008jQuery.validator.addMethod("byteRangeLength", function (value, element, pa 阅读全文
posted @ 2011-07-08 17:15 敏捷学院 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 原文链接: http://bbs.mjxy.cn/thread-63-1-1.html$(document).ready(function(e) { 02 $.getJSON("http://dev.mjxy.cn/json.aspx?n=5&jsoncallback=?",function(result){ 03 $(".devlist").empty(); 04 $.each(result, function(i,field){ 05 var html=""; 06 html="<li><a h 阅读全文
posted @ 2011-07-08 17:14 敏捷学院 阅读(202) 评论(0) 推荐(0) 编辑
摘要: http://dev.mjxy.cn/a-Ajax-call-to-remote-service.aspx$.get 方法调用webservice 处理返回结果。判断当前ip地址$.get("http://www.digitwest.com/Plus/Ip.asmx/GetAddress", function (data) { var a = $(data).find('string').text(); $('#ipdiv').html(a); }); 阅读全文
posted @ 2011-07-08 17:13 敏捷学院 阅读(643) 评论(0) 推荐(0) 编辑
摘要: 转自:http://dev.mjxy.cn/a-401.aspxpublic abstract class BizObject { protected const int MAXROWS = int.MaxValue-1; protected static Cache Cache { get { return HttpContext.Current.Cache; } } //Cache Data protected static void CacheData(string key, object data) { if (Settings.EnableCaching && dat 阅读全文
posted @ 2011-07-08 17:10 敏捷学院 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 转自:http://dev.mjxy.cn/a-397.aspx//去左空格;function ltrim(s){return s.replace( /^\s*/, "");}//去右空格;function rtrim(s){return s.replace( /\s*$/, "");}//去左右空格;function trim(s){return rtrim(ltrim(s));}//是否为空值;function IsEmpty(_str){var tmp_str = trim(_str);return tmp_str.length == 0;}//是 阅读全文
posted @ 2011-07-08 15:38 敏捷学院 阅读(640) 评论(0) 推荐(0) 编辑
摘要: 转自:http://dev.mjxy.cn/a-substring-from-the-right-to-obtain-the-specified-length-of-string.aspx/* Get the rightmost substring, of the specified length, from a String object.*/String.prototype.right = function (length_){ var _from = this.length - length_; if (_from < 0) _from = 0; return this.subst 阅读全文
posted @ 2011-07-08 15:37 敏捷学院 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 转自:http://dev.mjxy.cn/a-Javascript-Remove-control-character-from-string.aspx// Remove control character from a stringfunction removeNL(s){ // NewLine, CarriageReturn and Tab characters from a String // will be removed and will return the new string r = ""; for (i = 0; i < s.length; i++) 阅读全文
posted @ 2011-07-08 15:36 敏捷学院 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 转自: http://dev.mjxy.cn/a-169.aspxusing System;using System.Windows.Forms;using System.Drawing;using System.Drawing.Drawing2D;namespace DevDistrict.Sample{ public class GradientPanel : System.Windows.Forms.Panel { protected override void OnPaint(PaintEventArgs e) { base.OnPaint (e); Graphics g = e.Gr 阅读全文
posted @ 2011-07-08 15:34 敏捷学院 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 转自:http://dev.mjxy.cn/a-166.aspxprivate Image ScaleImage(Image source, int MaxWidth, int MaxHeight){ float MaxRatio = MaxWidth / (float) MaxHeight; float ImgRatio = source.Width / (float) source.Height; if (source.Width > MaxWidth) return new Bitmap(source, new Size(MaxWidth, (int) Math.Round(Max 阅读全文
posted @ 2011-07-08 15:32 敏捷学院 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 转载:http://dev.mjxy.cn/a-Create-pdf-using-Apache-NFOP.aspx//**************************************// Name: Create in memory PDF documents in ASP.NET using Apache NFOP// Description:The sample demonstrates how to create PDF documents in memory using the open source Apache NFOP(http://sourceforge.net/p 阅读全文
posted @ 2011-07-08 15:31 敏捷学院 阅读(1164) 评论(0) 推荐(0) 编辑
摘要: 转载:http://dev.mjxy.cn/a-402.aspxSystem.IO.Stream iStream = null; // Buffer to read 10K bytes in chunk: byte[] buffer = new Byte[10240]; // Length of the file: int length; // Total bytes to read: long dataToRead; // Identify the file to download including its path. string filepath = @"E:\softwar 阅读全文
posted @ 2011-07-08 15:18 敏捷学院 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 转自: http://dev.mjxy.cn/a-Download-the-file-to-stream-download-hide-the-real-path.aspx以流的方式下载文件,隐藏实际的下载路径view sourceprint?01string path = Server.MapPath("~/UploadFiles/" + "a.doc"); 02System.IO.FileInfo file = new System.IO.FileInfo(path); 0304Response.Clear(); 05Response.AddHeade 阅读全文
posted @ 2011-07-08 15:16 敏捷学院 阅读(483) 评论(0) 推荐(1) 编辑
摘要: 电子邮件正则表达式汉字验证正则表达式URL网址正则表达式电话号码正则表达式邮政编码正则表达式身份证正则表达式IP地址正则表达式数字的正则表达式字母正则表达式用户密码正则表达式空白行正则表达式HTML标记正则表达式首尾空白正则表达式帐号正则表达式日期验证正则表达式其他 阅读全文
posted @ 2011-07-08 13:44 敏捷学院 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 1DateTime thisDate1 = new DateTime(2011, 6, 10); 02Console.WriteLine("Today is " + thisDate1.ToString("MMMM dd, yyyy") + "."); 0304DateTimeOffset thisDate2 = new DateTimeOffset(2011, 6, 10, 15, 24, 16, 05TimeSpan.Zero); 06Console.WriteLine("The current date and tim 阅读全文
posted @ 2011-07-08 13:43 敏捷学院 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 代码下载: 敏捷学院技术资源库1.引用view sourceprint?1// TODO: Use Enterprise Library Data Block 23using Microsoft.Practices.EnterpriseLibrary.Data; 45using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;2.创建访问器view sourceprint?1// TODO: Create private fields for Data accessors 23private DataAccessor< 阅读全文
posted @ 2011-07-08 13:42 敏捷学院 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 使用配置工具加密数据库的连接信息代码下载:http://dev.mjxy.cn/a-entlib-Encrypted-connection-information.aspx1. App.Config01<configuration> 02<configSections> 03<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practic 阅读全文
posted @ 2011-07-08 13:40 敏捷学院 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 演示代码下载: http://dev.mjxy.cn/a-entlib-Access-the-database-using-stored-procedures.aspx使用存储过程访问数据库1.配置文件view sourceprint?01<configuration> 02<configSections> 03<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings 阅读全文
posted @ 2011-07-08 13:35 敏捷学院 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 本演练直接使用SQL语句来访问数据库1.配置文件01<configuration> 02<configSections> 03<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyTok 阅读全文
posted @ 2011-07-08 10:35 敏捷学院 阅读(477) 评论(0) 推荐(0) 编辑