07 2014 档案
前台调用后台函数
摘要:调用 var b = $ajax("WebApplication1._Default.GetDataSet", ["23"]);js:/*方法全名,参数,类所在的程序集名称(当方法类所在的命名空间不是程序集名称时请传参数来)*/function $ajax(paramMethod, paramVal...
阅读全文
flv mp4视频播放
摘要:protected void Page_Load(object sender, EventArgs e) { //这个你可以直接指定路径,当然可以接收从另外一页传过来的参数,再有一个就是从数据库取出来啦。 string file = ResolveUrl("~/Flv/歌曲:王菲《传奇》.fl...
阅读全文
table数据再次处理
摘要:Table的聚合函数Compute (表达式,条件)中简单的聚合函数string strSumAccount = myDs.Tables[0].Compute("SUM(AccountMoney(列))", "").ToString(); 计算datatable的列的总和分页PagedDataSou...
阅读全文
Split生成的数组没有空字符
摘要:string[] myArrayList = paramID.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
阅读全文
像页面输出脚本
摘要:无异步的 js = "window.parent.onComplete(" + System.Convert.ToString(uploadInfo.State != "Stop").ToLower() + ");"; } ScriptManager.RegisterStartupScript(...
阅读全文
js jq 一些属性
摘要:$(document).ready(function () { }); window.onload=方法;页面加载完触发var iWidth = 300; //窗口宽度 var iHeight = 200; //窗口高度 var iTop = (window.screen.height - iH...
阅读全文
将Date(...)转换成yyyy-mm-dd
摘要://yyyy-mm-ddfunction ChangeDateFormat(time) { if (time != null) { var date = new Date(parseInt(time.replace("/Date(", "").replace(")/", ""), 10)); var...
阅读全文
浮动
摘要:定位浮动style="position:fixed; float:none; top:30px; margin:auto"div浮动position:fixed;Z-INDEX:99; top:20%; left:30%;
阅读全文
Visible readonly enabled
摘要:Visible="false" 不显示控件readonly="false" 无法改变数值enabled="false" 不相应鼠标事件
阅读全文
递归查询所有子集
摘要:with myCte as(select * from RS_Comment where id=10000004union allselect RS_Comment.* from RS_Comment inner join myCte on RS_Comment.ParantID=myCte.id...
阅读全文
控制函数执行
摘要:不断执行timer1=setInterval(方法名,500);(500毫秒)clearInterval(timer1);取消不断执行js 延迟执行setTimeout(function () { window.location.reload() }, 3000);
阅读全文
bind 与unbind
摘要:bind 绑定 $("#btnSave").bind("click", BtnSaveClick);function BtnSaveClick(){...}$("#btnSave").click() 执行事件unbind 删除绑定
阅读全文
each()
摘要:循环 each() 参数:循环的对象,每次循环执行的函数,函数的参数(不传默认为对象本身)var lbl = $("#lbls > i");var str = "";Each(lbl, function (i) { str += i.innerHTML.trim()+","; });var arr ...
阅读全文
字体闪烁
摘要:字体闪烁function changeColor() { var color = "#336699|red"; color = color.split("|"); document.getElementById("blink").style.color = color[parseInt(Math.r...
阅读全文
checkbox全选 反选 不选 并获取id的值
摘要:$("#lblContents :checkbox").each(function () { if (this.checked) { this.checked = false; ids =""; } else { this.checked = true; ids += $(this)....
阅读全文
键值对参数转换为Jquery json data参数
摘要:键值对:var postData = new List>();postData.Add(new KeyValuePair("a", "1"));postData.Add(new KeyValuePair("b", "2"));postData.Add(new KeyValuePair("c", "3...
阅读全文
按字节截取字符串
摘要:按字节截取字符串,参数:字符串,截取的字符 function getStr(str, n) { if (lenFor(str) 255) { byteLen += 2; } else { byteLen++; } } return byteLen; } else { ret...
阅读全文
前后台交互
摘要:前台:document.getElementById("").value = 3; document.getElementById("").click(); 后台: protected void btnSearch_Click(object sender, EventArgs e) { Bin...
阅读全文
获取url参数
摘要:window.location.href = "Index.aspx"; 当前页面打开window.open("Index.aspx") 打开新页面url传参 ResourceEdit.aspx?IsManager=1&ID=2获取url参数 request("IsManager")=1 funct...
阅读全文
StringBuilder效果
摘要://对象定义(构造函数) //参数:所有参数须为字符串形式. //当参数长度为1时,参数值将是字符串之间连接的分隔符 //当参数长度大于1时,最后一位将是字符串之间的分隔符,其余的参数将是字符串值 //当不指定参数时,分隔符默认为空白 //也可以不指定分隔符,而在ToString中显式指定分隔符 /...
阅读全文
连接数据库
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.SqlClient; using System.Con...
阅读全文
加密
摘要:调用string mypwd = CommomLayer.MyEncryption.GetMD5Encording(pwd); using System; using System.Collections.Generic; using System.Security.Cryptography; us...
阅读全文
抽象类和抽象方法
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace ConsoleApplication1 { class Program { static void Ma...
阅读全文
虚方法 覆写
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using graphlei;namespace graphlei { /// /// 图形类 /// public...
阅读全文
冒泡排序
摘要:#region 数组 最大值 最小值 平均值 求和 冒泡排序 int[] arrag = new int[5] { 31, 62, 83, 54, 85 }; for (int i = 0; i arrag[j]) { int myarrag; myarrag = arrag[i]; a...
阅读全文
枚举
摘要:enum Day { sat = 10, sun, mom, tus, wes, fos, fie, fri }; static void Main(string[] args) { int x = (int)Day.sat; int y = (int)Day.wes; Console.WriteL...
阅读全文
随机数
摘要:1到4的随机数Random Random1 = new Random(); int i = Random1.Next(1,4); Console.WriteLine(i); Console.ReadKey();
阅读全文
参数数组
摘要:参数数组:关键字params,接受参数,多余的都加到数组中static void Main(string[] args) { meas("1","2","3") } public static void meas(string paramNumber, params string[] arrag) ...
阅读全文
字符串及字符的基础应用
摘要:字符串的应用 #region 查找字符 //string str = "123456"; //foreach (char time in str) //{ // Console.WriteLine("{0}", time); //} //Console.ReadKey(); #endr...
阅读全文
修饰符
摘要://私有的:private //公有的:public //受保护的:protected 只能在只有在分类和子类中可以访问 //静态的 static 无需实例化,可直接调用,不能用private定义 //密封的 sealed 不能被重写,不能别继承, //抽象的 abstact
阅读全文
计算三角形面积
摘要:double numberone, double numberTwo, double numberThree//三条边,注意两边之和大于第三编double doubleS = 0; double doubleArea = 0; doubleS = (numberone + numberTwo + n...
阅读全文
基础语句
摘要:基础语句 #region switch case // int Number=char.Parse(Console.ReadLine()); // switch (Number) //{ // case 1: // Console.WriteLine("1"); // break; /...
阅读全文
控制台
摘要:输出:Console.Write("hello");换行输出:Console.WriteLine("hello");获取输入的值:Console.ReadLine()控制台不关闭:Console.ReadKey();占位符:Console.WriteLine("Sum:{1} Minus:{0} R...
阅读全文
浙公网安备 33010602011771号