.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 }