摘要: 我的sql server 2008 express是visual studio 2010自带的,所以当然它没有management studio ,自己下了一个安装,不过无法安装SQL Server 2008 Management Studio Express。提示未选择功能。刚从网上找到解决方案,本人测试通过,再次分享:VS2010自带的SQL Server是Express简化版的,需要到“SQL Server安装中心>维护>版本升级”,把它升级成“具有高级服务的Express”(很快就可完成)。再运行SQL Server 2008 Management Studio Expre 阅读全文
posted @ 2013-05-21 09:20 徐文峰 阅读(355) 评论(0) 推荐(0) 编辑
摘要: win8下安装WAMP无法浏览主页的解决办法 阅读全文
posted @ 2013-03-05 15:47 徐文峰 阅读(1540) 评论(0) 推荐(0) 编辑
摘要: 这个是我在百度里面写的,转到这里来。当然是“参考”了别人的,拿来分享:在Controller里面写一个方法,只是一个简单的例子:1 public ActionResult Down()2 {3 string filePath = Server.MapPath("~/UpLoad/bomb3.png");4 string fileName = Path.GetFileName(filePath);5 Stream iStream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileSha... 阅读全文
posted @ 2012-01-29 13:47 徐文峰 阅读(527) 评论(0) 推荐(0) 编辑
摘要: 分享别人的东西:城市:public class City { public int ID { get; set; } public int pID { get; set; } public string Name { get; set; } }地区:public class District { public int ID { get; set; } public int cID { get; set; } public string Name { get; set; } }省份:public class Province { public int ID { get; ... 阅读全文
posted @ 2012-01-29 13:44 徐文峰 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 编写程序的时候,经常需要用的项目根目录。自己总结如下1、取得控制台应用程序的根目录方法 方法1、Environment.CurrentDirectory 取得或设置当前工作目录的完整限定路径 方法2、AppDomain.CurrentDomain.BaseDirectory 获取基目录,它由程序集冲突解决程序用来探测程序集2、取得Web应用程序的根目录方法 方法1、HttpRuntime.AppDomainAppPath.ToString();//获取承载在当前应用程序域中的应用程序的应用程序目录的物理驱动器路径。用于App_Data中获取 方法2、Server.MapPath("& 阅读全文
posted @ 2011-11-06 14:55 徐文峰 阅读(5506) 评论(1) 推荐(1) 编辑
摘要: <Label MaxWidth="550"><TextBlock TextWrapping="Wrap"Text="在此输入要换行的文字,前提是它足够长,并且Label的MaxWidth不足以让它一行显示。" /></Label> 阅读全文
posted @ 2011-08-30 15:34 徐文峰 阅读(8422) 评论(0) 推荐(0) 编辑
摘要: 第一种:<TextBlock> This is line 1.<LineBreak/> This is line 2.</TextBlock>第二种<TextBlock xml:space="preserve">This is line 1. This is an indented line 2.</TextBlock>第二种加了xml:space="preserve",可以直接在文本上按space,tab键,不用标记,比较方便 阅读全文
posted @ 2011-08-30 15:34 徐文峰 阅读(18503) 评论(1) 推荐(3) 编辑
摘要: 10. 数据提供程序(1) XmlDataProviderXmlDataProvider 允许我们直接将 XML 数据作为数据源,我们将前面章节的例子改成 XML 数据岛试试,注意此时我们已经不需要在代码中定义 Personal、PersonalList 类型。 1 <Window x:Class="Learn.WPF.Window1" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsof 阅读全文
posted @ 2011-08-22 16:51 徐文峰 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 8. 集合视图当绑定到一个集合对象时,WPF 总是默认提供一个视图 (CollectionViewSource)。视图会关联到源集合上,并自动将相关的操作在目标对象上显示出来。(1) 排序向 CollectionViewSource.SortDescriptions 属性中插入一个或多个排序条件 (SortDescription) 即可实现单个或多个条件排序。Window1.xaml 1 <Window x:Class="Learn.WPF.Window1" 2 xmlns="http://schemas.microsoft.com/winfx/2006/x 阅读全文
posted @ 2011-08-22 16:47 徐文峰 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 6. 数据模板数据模板为展示数据提供了极大的灵活性,我们继续以前面的例子来看看它的能力。 1 <Window x:Class="Learn.WPF.Window1" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 xmlns:my="clr-namespace:Learn.WPF" 5 Title=&quo 阅读全文
posted @ 2011-08-22 16:33 徐文峰 阅读(323) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示