什么时候应该使用一个本地化的控制,而不是字面的? [英] When should I use a Localize control instead of a Literal?

查看:175
本文介绍了什么时候应该使用一个本地化的控制,而不是字面的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近才知道的<一个href=\"http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.localize.aspx\">System.Web.UI.WebControls.Localize控制为ASP.NET 4.0 MCTS认证课程的实验室。这种控制的目的,我不清楚。

I recently became aware of the System.Web.UI.WebControls.Localize control in a lab for the ASP.NET 4.0 MCTS certification course. The purpose of this control is unclear to me.

在例子中,文字控制和本地化控制似乎更多或更少的互换。经查验,似乎从文字本地化控件继承,但没有提供额外的功能。它采用了不同的设计器类,这在我看来是比文字设计类能力较差。

In the examples, the Literal control and the Localize control appear to be more-or-less interchangeable. Upon inspection, it appears that the Localize control inherits from Literal, but provides no additional functionality. It uses a different designer class, which appears to me to be less capable than the designer class for literals.

所以,彩箱困惑。字面的本地化的的。什么是用于本地化控制?的应该的我使用它,以及在什么情况?

So, color me confused. Literals are localizable already. What is the Localize control used for? Should I use it, and under what circumstances?

推荐答案

这说明它最好的:

的本地化控制,您可以本地化的.aspx页面上的任何元素。 ,提供不其基类的文字控制提供了设计时间功能;特别是本地化控制提供了静态内容的设计时间编辑,所以你可以看到默认值在页面设计模式下工作,而

The Localize Control lets you localize any element on an .aspx page. It provides a design time feature not offered by its base class, the Literal control; in particular, the Localize control provides design time editing of static content so you can see a default value while working in page design mode.

在这里找到:<一href=\"http://wiki.asp.net/page.aspx/357/localize/\">http://wiki.asp.net/page.aspx/357/localize/

MSDN (底部有一个很好的说明)

MSDN (bottom section has a good description)

这篇关于什么时候应该使用一个本地化的控制,而不是字面的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆