.NET随记.txt放在桌面很久了,编程过程当中记录些杂七杂八的东西,分享给你们但愿有所帮助。javascript
Manual | 服务安装后,必须手动启动 |
Automatic | 每次计算机从新启动时,服务都会自动启动 |
Disabled | 服务没法启动 |
1 LunwenService.myWebService1 lws = new LunwenService.myWebService1(); 2 message = lws.GetLunWenName(2); 3 message = lws.GetLunWenDS(3); 4 Response.Write(message);
var query1=from item in dt.AsEnumerable() orderby item.Field<int>("Age") descending select item;//排序 foreach (var item in query1) { Console.WriteLine("姓名:{0},性别:{1},年龄:{2}",item.Field<string>("Name"),item.Field<string>("Sex"),item.Field<int>("Age")); }
1 <script type="text/javascript"> 2 $(document).ready(function(){ 3 $("#btn1").click(function(){ 4 $("#p1").hide();}); 5 }); 6 </script>
1 document.getElementById("id").style.background="#1112"; 2 document.getElementById("id").style.background="url(img.ipg)";
1 Regex regex = new Regex(@"^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$"); 2 if(regex.IsMatch(mail)) 3 return true;
1 create procedure pro_fenye 2 @pageSize int,@pageNow int 3 as 4 begin 5 Select top @pageSize 字段名列表 from 表名 where id not in( 6 select top @pageSize*(@pageNow-1) id 7 from 表名) 8 end 9 --@pageSize 每页的显示多少条数据 10 --@pageNow 当前显示的是第几页
1 chart1.DataSource=Ds; 2 chart1.Series["Series 1"].XValueMember = "Name"; 3 chart1.Series["Series 1"].YValueMembers = "Sales"; 4 chart1.DataBind();
1 double [] yval = { 2,6,4,5,3}; 2 string [] xval = { "Peter", "Andrew", "Julie", "Mary", "Dave"}; 3 Chart1.Series["Series 1"].Points.DataBindXY(xval,yval);
1 function getRootPath(){ 2 //获取当前网址,如: http://localhost:8083/uimcardprj/share/meun.jsp 3 var curWwwPath=window.document.location.href; 4 //获取主机地址以后的目录,如: uimcardprj/share/meun.jsp 5 var pathName=window.document.location.pathname; 6 var pos=curWwwPath.indexOf(pathName); 7 //获取主机地址,如: http://localhost:8083 8 var localhostPaht=curWwwPath.substring(0,pos); 9 //获取带"/"的项目名,如:/uimcardprj 10 var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1); 11 return(localhostPaht+projectName); 12 }