摘要:
泛型List去除重復指定字段ID var list=listTemp.Distinct(new IDComparer ()).ToList(); 重寫比較的方法: public class IDComparer : IEqualityComparer<T> { public bool Equals(
閱讀全文
posted @ 2017-11-28 19:07
xs~ing
閱讀(1173)
推薦(0)
摘要:
1、去除首尾空格: var txt = $('#Txt').val().trim(); txt = txt.replace(/(^\s*)|(\s*$)/g, ""); 2、去除所有空格: txt = txt.replace("//s/g", "");
閱讀全文
posted @ 2017-11-16 17:27
xs~ing
閱讀(9809)
推薦(0)
摘要:
//itemsControl 開始為指定的TreeView控件 item為TreeView子元素 private void PareItems(ItemsControl itemsControl, T item) { TreeViewItem container = itemsControl.Ite
閱讀全文
posted @ 2017-05-31 14:38
xs~ing
閱讀(2415)
推薦(0)
摘要:
發布網站后,發現無法訪問,最后在配置文件上添加一段: <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,Sy
閱讀全文
posted @ 2017-04-17 09:23
xs~ing
閱讀(180)
推薦(0)
摘要:
1、后臺屬性綁定: Grid g = new Grid() { Width = 60, Height = 100 }; g.SetValue(Panel.ZIndexProperty, 10); //Canvas.SetBottom 綁定數據MLength Binding bind = new Bi
閱讀全文
posted @ 2017-03-24 15:15
xs~ing
閱讀(206)
推薦(0)
摘要:
html代碼: @using (Html.BeginForm("xx", "xx", FormMethod.Post, new { enctype = "multipart/form-data", id = "form1", @class = "form-horizontal", role = "f
閱讀全文
posted @ 2016-12-01 16:55
xs~ing
閱讀(1606)
推薦(0)
摘要:
配置文件web.config <appSettings> <add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Enabled" value="false" /> <add key="ClientValidationEna
閱讀全文
posted @ 2016-12-01 16:29
xs~ing
閱讀(953)
推薦(0)
摘要:
以圖片為例 后臺Controller.cs public FileResult ImageUrl(string file) { return File("物理路徑"+file, "image/png"); } 前臺.cshtml <img src='@Url.Action("ImageUrl", "
閱讀全文
posted @ 2016-08-15 17:48
xs~ing
閱讀(1264)
推薦(0)
摘要:
<ScrollViewer MaxHeight="400" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" BorderBrush="Transparent"> <ScrollViewer.Effec
閱讀全文
posted @ 2016-03-18 10:32
xs~ing
閱讀(237)
推薦(0)