Archive for the ‘iTech’ Category

ASP.NET MVC ”failed to acquire mutex lock asp.net“的错误解决办法

出现这个错误提示的原因有可能是因为Visual studio和.net framework在临时文件夹上有冲突。我查了一些文档,最后是这么解决的 – 如果你现在开着 visual studio 2005/2008/2010 ,需要先关闭它 – 然后到你对应版本的 ASP.NET temporary folder(比如.net 2.0,3.5或者4.0) <Windows dir>\Microsoft.Net\Framework\v4.0<extra numbers>\Temporary ASpNET pages – 删除Temporary ASpNET pages这个临时目录下的所有文件夹 – Reset IIS (或者在命令行里执行 >iisreset) – 先去浏览器里访问一下你的网站(http://localhost/your app) – 然后打开Visual studio

Read the rest of this entry »

ASP.NET MVC 2 学习笔记: view和control之间传值

在asp.net2.0的网页开发模式下,我们一般通过直将访问页面控件, 将值写入到页面, 但在Asp.net MVC模式下,已不能在Controller中再去访问页面控件了,要如何才能给View页面传值呢? 在Controller中有两个字典(ViewData和TempData)来实现View之间的值传递, 在ControllerBase类声明中我们就可以看到: namespace System.Web.Mvc { // 摘要: //     Represents the base class for all MVC controllers. public abstract class ControllerBase : MarshalByRefObject, IController

Read the rest of this entry »

Visual Studio 2010 快捷键(VS2010)

Ctrl+E,D —-格式化全部代码 Ctrl+E,F —-格式化选中的代码 CTRL + SHIFT + B生成解决方案 CTRL + F7 生成编译 CTRL + O 打开文件 CTRL + SHIFT + O打开项目 CTRL + SHIFT + C显示类视图窗口 F4 显示属性窗口 SHIFT + F4显示项目属性窗口 CTRL + SHIFT + E显示资源视图 F12 转到定义 CTRL + F12转到声明 CTRL + ALT + J对象浏览 CTRL + ALT + F1帮助目录 CTRL + F1 [...]

Read the rest of this entry »

如何删除Tortoise SVN目录信息

SVN超级强大,可是遇到的问题也多多。 最近有朋友问怎么删除一个项目的SVN信息,我也没弄过,搜了半天, linux下可以用命令如下: find . -type d -name “.svn”|xargs rm -rf 或 find . -type d -iname “.svn” -exec rm -rf {} \; windows思路相同,但是这里介绍一个非常简单快捷的方法: 删除.svn目录,windows环境,在资源管理器下,在右边的栏目下找到你要删除.svn的目录,右键不放开,拖到左边那个目录上,即跳出选项,可选项中有 export all to here ,即把当前目录中的.svn目录删除掉了~ svn信息是根据文件夹里面的 .svn 文件夹保存相关配置的,删除此文件夹即可去掉svn信息: linux下: find . -type d -name “.svn”|xargs rm -rf 或 find . -type d -iname “.svn” -exec rm -rf {} \; windows [...]

Read the rest of this entry »

WPF里如何屏蔽数字以外的字符,只允许输入数字(或者小数点)

这段代码是为了解决WPF里如何屏蔽数字以外的字符,只允许输入数字(或者小数点)的问题。 在。cs源文件添加如下事件之后,再把事件附加到要应用的Textbox里上。具体就是点击Textbox,在右下角切换到Events这个tab页面里,选择相应的KeyDown事件和TextChanged事件。 #region Added by Will for TextBox: Numbers input only 屏蔽数字以外的字符 private void TextBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { TextBox txt = sender as TextBox; //屏蔽非法按键 if ((e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9) || e.Key == Key.Decimal) { //if (txt.Text.Contains(“.”) && e.Key == Key.Decimal) if (e.Key == Key.Decimal)

Read the rest of this entry »

如何在WPF调整datagrid控件的各项颜色DataGridColumnHeader,DataGridRowHeader

WPF4.0终于支持datagrid控件了,是个多么重要的进步啊,lol,但是怎么调整各项颜色呢? 下面的代码举例了主要的设置方法。包括对列头,行头的设置。最重要的是如何改变选中行的颜色。这个有些麻烦,不能直接通过属性修改,要先继承系统自身的brush,然后定义颜色,如下列代码所示: <DataGrid.Resources> <SolidColorBrush x:Key=”{x:Static SystemColors.HighlightBrushKey}” Color=”#E146474B”/> </DataGrid.Resources>

Read the rest of this entry »

WPF里如何动态调整控件位置

控件的位置往往是需要动态调整的,那么在WPF里如何设置呢? 我们需要用到控件的Margin属性。 首先的大前提是我们要把控件的对齐方式设置好,比如向上向左对齐或者向下向右对齐,否则相对的另一方向的参数就没有作用了。 然后在C#代码里用 Thickness来调整,这里我就用常量举例了: button1.Margin = new Thickness(10,10,0,0); 就这么简单,希望有帮助。

Read the rest of this entry »

用google绕过登录检测界面,直接访问资源

先打开Google,在关键词输入框中输入”index of/”inurl:lib(双引号为英文状态下),选择“搜索简体中文网页”选项,回车搜索,得到了一些网页,不要以为这是一些普通的页面,其实它们是一些图书网站的资源列表,点击打开它来看看,怎么样?是不是所有资源一收眼底了? 使用其他关键字可能得到更多的资源 在搜索框上输入:”index of /”cnki 再按搜索你就可以找到许多图书馆的CNKI、VIP、超星等入口! 在搜索框上输入:”index of /” ppt

Read the rest of this entry »

Google gmail离线邮件存放目录 Where are Gears files stored?

那天发了个google gmail可以离线浏览的帖子,有朋友问我离线的邮件存放在哪了。 确实不好找,于是搜了一下,发现不同系统不同浏览器存放位置不同,需要的朋友请参考下面的列表: Where are Gears files stored? Windows Vista – Internet Explorer Location: {FOLDERID_LocalAppDataLow}\Google\Gears for Internet Explorer Example: C:\Users\Bob\AppData\LocalLow\Google\Gears for Internet Explorer Windows Vista – Firefox – Files are stored in the user local profile directory. Location: C:\Users\\AppData\Local\Mozilla\Firefox\Profiles\{profile}.default\Gears for Firefox Example: C:\Users\Bob\AppData\Local\Mozilla\Firefox\Profiles\uelib44s.default\Gears for Firefox Windows XP – Internet Explorer – Files are stored in [...]

Read the rest of this entry »

Microsoft Expression Studio 3简体中文版下载_微软官方正式版

Microsoft Expression Studio 3简体中文版下载_微软官方正式版 时间:2009-09-16 17:28:46 作者: 来源: 核心提示:微 软终于发布了Expression Studio 3简体中文版,同英文版本一样这套专业的设计和 Internet 应用组合工具套装(Expression Studio 3)包含了 ExpressionWeb3_3 Expression Web 3、ExpressionDesign3_3 Expression Design 3、ExpressionBlend3_3 Expression Blend + SketechFlow 3 和 ExpressionEncoder3_3 Expression Encoder 四大组件

Read the rest of this entry »