随笔分类 - 学习笔记
注意点
摘要:阶段总结,以便自己查漏补缺。1.新建一个asp.net项目,包括BLL、DAL、MODEL、Helper、WEB,DAL负责数据处理,BLL负责逻辑处理,MODEL自定义一些数据模型,Helper放一些公共类,WEB则是页面的显示。2.项目结构要清晰,css、js、image都归类放。3.文件命名规范,如驼峰命名法,代码书写要整齐。4.浏览器兼容性要测试。5.页面查看权限要处理,尤其要注意url传值查看页面。6.数据转换类型要try catch ,防止错误发生。7.一些基本代码能记住就记住,要罗列一下。8.基础知识巩固,比如:public、static、protected的区别,看面试题是个不
阅读全文
摘要:1.dropdownlist的绑定 BLLAuction bll_getAuction=new BLLAuction(); this.ddlauctioncode.DataSource = bll_getAuction.GetAuctionList(); this.ddlauctioncode.DataTextField = "Name"; this.ddlauctioncode.DataValueField = "code"; this.ddlauctioncode.DataBind...
阅读全文
摘要:1.获取ip地址http://www.itbobo.com/asp-net-access-to-client-and-server-ip-address.htmlHttpContext.Current.Request.ServerVariables.Get("Remote_Addr").ToString();
阅读全文
摘要:1.用来对上一个页面刷新 Response.Write("<script>window.parent.document.getElementById('form1').submit();</script>"); 2.css一张图多个图标的定位 .icon{ background:url(../JsE
阅读全文
摘要:1.colorbox学习2.href="javascript:history.go(-1);"历史后退
阅读全文
摘要:1.master母版页里的图片路径,是根据引用母版页的页面来决定的?2.IE8 的开发人员工具,点开该工具的时候,在工具栏有图标,但是点击没法展现出来.由于未知原因,开发人员工具的窗口大小被设置成0高度,而且位置被设置到了屏幕左上方,出了屏幕之外了,所以怎么也看不到它,也移动不了它。在XP下可以右键,最大化Windows7下,可以使用视窗键+方向键来控制窗口的显示.2.两数据相加减,注意 null
阅读全文
摘要:1.onkeypress="if (event.keyCode < 48 || event.keyCode >57) event.returnValue = false;"2.checked 判断true or false 用js 的 document.....3.IE6|IE7中li底部3px间距BUG#list li设置float:left4.vertical-align:bottom;5.a标签执行form的submit()事件 form1.submit();6.ajax定时获取数据7.asp.net 后台生成html标签 <ul id="
阅读全文
摘要:1.框架里访问上一层 $(document).ready(function () { window.top.document.getElementById("Cname").value = ""; window.top.document.getElementById("phoneNum").value = ""; window.top.document.getElementById("txCaseport").value = ""; });???parent.document
阅读全文
摘要:1.window.parent2.autocomplete="off"3.function DX(n) { //金额大写转换函数 if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)) return "数据非法"; var unit = "千百拾亿千百拾万千百拾元角分", str = ""; n += "00"; var p = n.indexOf('.'); if (p >= 0) n = n.substring(0, p) + n.substr(p
阅读全文
摘要:1.Convert.ToInt32、(int)和int.Parse三者的区别:前者适合将object类类型转换成int类型(int)适合简单数据类型之间的转换int.Parse适合将string类类型转换成int类型2.Math.Round(decimal.Parse(text1.Text.Trim()),2);3.String.Format和WriteLine都遵守同样的格式化规则。格式化的格式如下:"{ N [, M ][: formatString ]}", arg1, ... argN,在这个格式中:1) N是从0开始的整数,表示要格式化的参数的个数2) M是一个可
阅读全文
摘要:1.第一次加载页面时Page.ispostback是false,当触发该页面的web控件时,产生回发,这时候 该属性会是true,所以要用if(!IsPostback)来判断,只在第一次进入页面时加载数据。2.放在使page_load里的代码只执行一遍3.Page.IsPostBack 属性获取一个值,该值指示该页是否正为响应客户端回发而加载,或者它是否正被首次加载和访问。
阅读全文
摘要:1. 将成功生成的图标文件下载并改名为favico.ico,上传到网站根目录。2. 在网站首页的源文件<head> </head>之间插入下面的斜体部分代码<head> ……<link rel="shortcut icon" href="favicon.ico"></head>3.动态ico图标的实现方法,先把做好的gif动态图标命名为favico.gif <head></head>之间加上: <link rel="icon" href=&quo
阅读全文
摘要:iframe里可以加载一个新的网页<div id="tip" onmousedown="down(this.id)" onmousemove="move()" onmouseup="up()"> <div id="close" onclick="display()"></div> <iframe frameborder=0 id="tip_content" name="newwindow">
阅读全文
摘要:<script language="javascript" type="text/javascript"> functionTestAjax(){ $.ajax({ url: "http://www.www.net/", //ajax请求的路径 dataType: "json", data: "id=150"+"&r=" + Math.random(), //请求的参数 type: "post", success: function (
阅读全文
摘要:js:var isDrag = 0;var divMove; var divAndMouseX;//鼠标落点距离div左上角x坐标的差距 var divAndMouseY;//鼠标落点距离div左上角y坐标的差距 function down(div) { isDrag = 1; divMove = div; divAndMouseX = event.clientX - parseInt(document.getElementById(div).offsetLeft); divAndMouseY = event.clientY - parseInt(document.getElementById
阅读全文
摘要:javascript:document.getElementById("id").focus();或javascript:document.all.id.focus();或javascript:document.all.name.focus();例子:<input type="text" name="tt" id="tt"> <input type="button" name="bt" id="bt" onclick="java
阅读全文
摘要:var docWidth = document.body.offsetWidth; // var docHeight = document.body.offsetHeight; var divobj = document.getElementById("align"); var divWidth = divobj.offsetWidth; // var divHeight = divobj.offsetHeight; //让图片左右居中显示 var marginleft=(docWidth-divWidth)/2; divobj.style.marginLeft = mar
阅读全文
摘要:通过offsetTop获取top值,object.offsetTopobject.style.top不能获取top值,但可以设置top值
阅读全文
摘要:<SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no') //写成一行 --> </SCRIPT> 参数解释: <SCRIPT LANGUAGE="javas
阅读全文
摘要:通用:border-collapse:collapse; ie7、ie8兼容border-collapse: separate。单元格分开了,有间隙ie8、FF可用:border-spacing: 0px;设置了border-collapse:collapse那么border-spacing/cellspacing就无效了table有cellspacing、cellpadding等属性
阅读全文

浙公网安备 33010602011771号