资源相互引用时 需添加 PerformSubstitution=True
摘要:获取或设置一个布尔值,该值确定在对由WebResourceAttribute类引用的嵌入式资源的处理过程中是否分析其他 Web 资源 URL,并用到该资源的完整路径替换。如:一个CSS文件引用其它images的时候,需要用到这个参数。
阅读全文
posted @
2013-10-28 23:22
Chopper
阅读(175)
推荐(0)
AJAX enabled & disabled
摘要:@model string @{ ViewBag.Title = "GetPeople"; AjaxOptions ajaxOpts = new AjaxOptions { UpdateTargetId = "tableBody", InsertionMode= InsertionMode.Replace, Url = Url.Action("GetPeopleData") //确保javascript enable和disable时能正常显示 };} GetPeople First Last Role @Html.Action(&q
阅读全文
posted @
2013-07-01 21:09
Chopper
阅读(349)
推荐(0)
登录以后,能够返回到登录前画面
摘要:1. Controller[HttpPost] public ActionResult LogOn(LogOnModel model, string returnUrl)2. View@model MvcApplication2.Models.LogOnModel @{ ViewBag.Title = "Log On"; string retUrl = ""; if (ViewContext.HttpContext.Request.UrlReferrer != null) { retUrl = ViewContext.HttpContext.Reques
阅读全文
posted @
2013-06-24 23:03
Chopper
阅读(272)
推荐(0)
.Net 自定义应用程序配置
摘要:.Net 自定义应用程序配置引言几乎所有的应用程序都离不开配置,有时候我们会将配置信息存在数据库中(例如大家可能常会见到名为Config这样的表);更多时候,我们会将配置写在Web.config或者App.Config中。通过将参数写在配置文件(表)中,我们的程序将变得更加灵活,只要对参数进行修改,再由程序中的某段代码去读取相应的值就可以了。而如果直接将配置值写在程序中,当配置需要改变时,则只能通过修改代码来完成,此时往往需要重新编译程序集。本文不是讲述.Net Framework中诸多的内置结点如何设置,比如httpHandler、httpModule、membership、roleMana
阅读全文
posted @
2013-05-13 21:19
Chopper
阅读(354)
推荐(1)
GAC(Global Assembly Cache)
摘要:全局程序集缓存,存放公共Assembly,避免一个DLL从一个目录拷贝到另一个目录。保存在C:\Windows\assembly目录下。注册:gacutil -i xxxx.dll卸载:gacutil -u xxxx
阅读全文
posted @
2013-05-12 17:07
Chopper
阅读(145)
推荐(0)
ASP.NET 错误
摘要:用Visual Studio2008 启动调试时出现以下错误:configuring web site for asp.net failed you must manually configure this site.....在IE中浏览网页时:访问IIS元数据库失败异常详细信息: System.Web.Hosting.HostingEnvironmentException:访问IIS元数据库失败。解决办法:到 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 这个目录下执行:aspnet_regiis.exe -iaspnet_regiis.exe
阅读全文
posted @
2013-05-12 11:11
Chopper
阅读(135)
推荐(0)