摘要: 泛型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 阅读(1164) 评论(0) 推荐(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 阅读(9744) 评论(0) 推荐(0) 编辑
摘要: //itemsControl 开始为指定的TreeView控件 item为TreeView子元素 private void PareItems(ItemsControl itemsControl, T item) { TreeViewItem container = itemsControl.Ite 阅读全文
posted @ 2017-05-31 14:38 xs~ing 阅读(2388) 评论(0) 推荐(0) 编辑
摘要: 发布网站后,发现无法访问,最后在配置文件上添加一段: <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,Sy 阅读全文
posted @ 2017-04-17 09:23 xs~ing 阅读(161) 评论(0) 推荐(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 阅读(200) 评论(0) 推荐(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 阅读(1597) 评论(0) 推荐(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 阅读(946) 评论(0) 推荐(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 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: <ScrollViewer MaxHeight="400" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" BorderBrush="Transparent"> <ScrollViewer.Effec 阅读全文
posted @ 2016-03-18 10:32 xs~ing 阅读(228) 评论(0) 推荐(0) 编辑