此代码位于母版页内:
Run Code Online (Sandbox Code Playgroud)<li><a href="<%=Url.Action("Action", "Controller") %>">Main site link</a></li> <li><a href="<%=Url.Action("AreaAction", "AreaController", new {area = "Area"}) %>">Area link</a></li>
所有的链接都很好,直到我去区域链接.当我去那里时,主要区域的所有路线都不起作用.
为了解决这个问题,我可以使用它:
Run Code Online (Sandbox Code Playgroud)<li><a href="<%=Url.Action("Action", "Controller", new {area = ""}) %>">Main site link</a></li>
我的问题是,有没有办法避免, new {area = ""}在主站点的每个链接?
在网站的每个链接上都有这个非常烦人.
以这堂课为例:
public class Category : PersistentObject<int>
{
public virtual string Title { get; set; }
public virtual string Alias { get; set; }
public virtual Category ParentCategory { get; set; }
public virtual ISet<Category> ChildCategories { get; set; }
public /*virtual*/ void Add(Category child)
{
if (child != null)
{
child.ParentCategory = this;
ChildCategories.Add(child);
}
}
}
Run Code Online (Sandbox Code Playgroud)
在没有add方法的虚拟关键字的情况下运行应用程序时,我收到此错误:
Run Code Online (Sandbox Code Playgroud)method Add should be 'public/protected virtual' or 'protected internal virtual'
我理解为什么属性需要声明为虚拟,因为它需要被延迟加载功能覆盖.
但我不明白为什么需要将方法声明为虚拟...它们需要被覆盖的原因是什么?
这非常令人困惑!
我需要的编辑器需要易于使用.即使对于完全没有HTML知识的人也是如此
我尝试的项目是:
我正在寻找的是:
编辑:我现在考虑的最好的解决方案是使用:
TinyMCE for WYSIWYG编辑器.
编写自定义代码,以实际文章格式显示它.
编写将图片上传到网站的Ajax代码,然后编辑可以根据他们的ID /名称在文章中安排它们.
您如何看待解决方案?也许你有更好的主意?
如何为每个操作设置maxAllowedContentLength值?
我有一些用于上传文件的操作,每个操作都需要不同的maxAllowedContentLength值.
有意义的是,我们不想使用动作过滤器,因为我们希望在IIS级别过滤此请求.另一方面,动作过滤器是从编码角度来看的最佳解决方案,因为它们在路线之后,所以我路线改变,它继续工作.
在IIS6中,我知道我们可以使用<location>tag来指定maxRequestLength特定位置.我不知道如何在IIS7上使用这种方法,我不喜欢这种方法,因为url路由是在web.config中手动编码的.
解决这个问题的最佳解决方案是什么?
阅读完这篇文章后,建议使用Team Edition for Database Professionals,我想知道SQL server 2008/Visual stuio 2010终极有没有相同的内容.
我正在寻找工具需要做他在文章中提到的所有事情:
有关详细信息,请参阅以下文章:http://www.codinghorror.com/blog/2006/12/is-your-database-under-version-control.html
Visual Studio 2010(和2008)似乎对此问题采用了非常强大的方法.我不知道它是否是最好的选择,但绝对是好的.
以下是Getting Started和Walkthrouge,以了解如何开始使用它.
当我尝试提交时,我收到此错误.做了什么,我认为是文件夹的重命名.我尝试重命名/移动文件夹.但我继续得到错误.
Run Code Online (Sandbox Code Playgroud)Command: Commit Error: Commit failed (details follow): Error: File 'Page.aspx' is out of date Error: File not found: transaction '99-4a', path '/trunk/src/Solution.UI/Views/ViewName/Page.aspx' Error: You have to update your working copy first.
我确实尝试更新,但不幸的是没有解决问题.
Run Code Online (Sandbox Code Playgroud)Command: Update Completed: At revision: 99
编辑:从文件夹中删除文件后,执行更新以恢复它们,并将恢复的文件替换为原始文件我收到此错误:
Run Code Online (Sandbox Code Playgroud)Error: Commit failed (details follow): Error: Base checksum mismatch on '/trunk/src/Solution.UI/Views/ViewName/Page.aspx': Error: expected: ed3bc4a70ee4256bd2f7cf8c57f29a1f Error: actual: b8a2797dc262dc714fae6dc897b5ebd2
在XHTML 1.1严格模式下禁止使用以下代码:
<form method="post" action="index">
<input id="_method" name="_method" type="hidden" value="" />
</form>
Run Code Online (Sandbox Code Playgroud)
如果你希望它有效,那么你需要用div(或p等等)包装它,如:
<form method="post" action="index">
<div>
<input id="_method" name="_method" type="hidden" value="" />
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
这有什么意义呢?
Visual Studio 2010包含已经是Sql Server实例,或者我需要安装Sql Server开发版来开发一个需要Sql Server db的应用程序.
如果它安装了一个Sql Server Express版本,那么这个还是Sql Server开发者版本更好吗?
sql-server visual-studio-2010 sql-server-2008-express sql-server-2008 visual-studio-2010-rc
.net ×4
asp.net-mvc ×2
base64 ×1
c# ×1
guid ×1
html-editor ×1
iis-7 ×1
lazy-loading ×1
nhibernate ×1
reflection ×1
sql-server ×1
tortoisesvn ×1
wysiwyg ×1
xhtml ×1