- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我有这样的文本需要本地化
<p>Please enter your user name and password. @Html.ActionLink(@Resources.Register, "Register") if you don't have an account. </p>
文本中经常有一个 ActionLink。
我可以为整个 ActionLink 使用类似 {0} 的东西吗
@string.Format(Resources.LogOn_Enter_Message, Html.ActionLink(@Resources.Register, "Register"))
(这不起作用,因为链接变成了字符串)
还是我必须将段落分成两部分?
最佳答案
你应该这样做:
@Html.Raw(string.Format(Resources.LogOn_Enter_Message, Html.ActionLink(@Resources.Register, "Register")))
并存储您的本地化字符串:
<p>Please enter your user name and password. {0} if you don't have an account. </p>
关于c# - 如何本地化包含 Html.ActionLink 的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10102487/
I want to replace X with glyphicon-trash. 我正在使用 X 作为链接文本。这适用于删除项目。如何用字形替换。 这是我的代码 @Html.ActionLink(
我可以通过 Ajax.ActionLink("Getcustomers","GetCustomers","Customer") 调用 asp.net mvc Controller ; 我可以使用 Ht
假设我有一个用户列表: 用户/Index.cshtml @model IEnumerable @foreach (var user in Model) { @Html
我试图通过 POSTing 而不是 GETting 导航到 MVC 操作。 (该操作是 DELETE,我不希望它可以通过外部链接访问。) 我在由生成的网格中使用链接 Ajax.ActionLink(
Ajax.ActionLink("Link name",....) 可以用复选框代替“链接名称”吗? 如果是这样怎么办? 谢谢, 最佳答案 是的,当然这是可能的。您可以使用标准复选框: @Html.C
我想使用jquery调用actionlink,下面是代码: $("#paycheck").click(function () { if ($("#terms").attr("che
我有两条路线: routes.MapRoute( "route1", "{controller}/{action}/{param1}/{param2}/NotT
我正在使用 bootstrap 将我的元素放在正确的位置,当我尝试将它与来自 asp.net 的 actionlink 一起使用时,它不使用所有行,它只使用文本的大小,我想要使用所有行的元素,以便我可
这个问题在这里已经有了答案: How to use CSS on an Html.ActionLink in C# (2 个答案) 关闭 4 年前。
我想使用 jQuery 创建按钮效果,即 mouse_over、mouse_leave 和 mouse_click。我有使用 visual studio 2012 在 mvc 4 中的 ActionL
我在路由表中有一些预定义的 URL 实际上指向相同的 Controller 和操作,但语言不同。例如 routes.MapRoute( "Contact
我正在尝试创建一个 ActionLink 以从网格中导出数据。网格根据查询字符串中的值进行过滤。这是 url 的示例: http://www.mysite.com/GridPage?Column=Na
如问题所述,是否可以使用包含元素的 ActionLink,如果不能,实现它的最佳方法是什么? 例如,假设我有一个 Span 元素,我希望整个元素成为一个超链接...以下工作:
这是简单的 html: --%> 我想用它们制作 html.actionlink: 我想要没有文字的链接。它不起作用,第一个参数中不允许为 null。图像是正常的短。我如何在没有文本
我使用以下代码来实现排序: @Ajax.ActionLink("Name", "Cause", "Search", new { query = Model.Query, category =
全部, 掌握 ASP.NET MVC。到目前为止,一切都很好,但这个有点疯狂。 我有一个包含超链接属性字典的 View 模型,使用如下: 菜单 = 模型变量 Html.ActionLink(Html.
没有创建我自己的 ActionLink HtmlHelper 有没有办法强制任何 ActionLinks 呈现小写? 更新: 查看以下链接以扩展 RouteCollection 以添加 Lowecas
谁能解释为什么会发生以下情况?以及如何解决,Visual Studio 2010 和 MVC2 结果是 /Product/AddOption?class=lightbox 结果是 /Product
如何向这个@Html.ActionLink 添加一个类?我尝试了很多建议,但到目前为止都没有奏效。 @Html.ActionLink("Physicia
我在 ASP.NET-MVC 应用程序的 View 中使用 Ajax.ActionLink,并且我正在使用 InsertionMode.Replace,但我看到还有一个 ReplaceWith 选项。
我是一名优秀的程序员,十分优秀!