How to: Use Resources to Set Property Values in Web Server Controls
In an ASP.NET page, you can use the following methods to read values from resource files:
Implicit localization ASP.NET fills property values from a local resource file based on matching keys to properties. By using a tool in Visual Web Developer, you can automatically mark all of the controls on a page for implicit localization.
Explicit localization Create an expression that reads a specific resource from a local or global resource file. You should create expressions for every control property that you want to set by using a resource.
Open the page for which you want to create resource files.
Switch to Design View.
In the Tools menu, click Generate Local Resource.
Visual Web Developer creates the App_LocalResources folder if it does not already exist. Visual Web Developer then creates the base resource file for the current page, which includes a key/name pair for every localizable control of every ASP.NET Web server control on the page. Finally, Visual Web Developer adds a meta attribute to each ASP.NET Web server control to configure the control to use implicit localization.
In Design view, select the control for which you want to use resource expressions.
In the Data category of the Properties window, click (Expressions) andthen click the ellipsis button.
In the Expressions dialog box, under Bindable Properties, select the property that you want to set by using a resource.
In the Expression type list, click Resources.
If you are working with global resources, then type the class name for the resource file that you want to use in the ClassKey box.
In the ResourceKey box, type the name of the resource that you want to use. If you are using the local resource file for the current page, you can click the drop-down arrow to see a list of resources that are available in the file.
Repeat steps 3 through 6 for each property that you want to set in the current control and then click OK.
Repeat steps 1 through 8 for each control for which you want to use resources.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13651903/viewspace-1038461/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- how to use typeset?
- Understanding How to Set the SQL Server I/O Affinity OptionSQLServer
- web server apache tomcat11-08-JNDI ResourcesWebServerApacheTomcat
- how to use coffee script
- In Oracle,How to use dumpOracle
- Cannot set property 'innerHTML' of nullHTMLNull
- [Javascript] How javascript read the property?JavaScript
- Dynamics 365 Web API Set Values of all Data Types using Web API in Dynamics CRM Through C#WebAPIC#
- How to: Set the Culture and UI Culture for ASP.NET Web Page GlobalizationUIASP.NETWeb
- Need to set ‘serverTimezone‘ propertyServer
- Cannot set property ‘type‘ of null(vue)NullVue
- 翻譯|How to Use the useReducer HookuseReducerHook
- how to use ghd hair straightenerAI
- How to use hints in Oracle sql for performanceOracleSQLORM
- eclise 部署web工程報 There are no resources that can be added or removed from the server.WebREMServer
- How to set up printers for GUI?GUI
- How to use Qt Designed Ui fileQTUI
- How to use rman backup a noarchivelog databaseHiveDatabase
- How to use sql result stored on shell variable?SQL
- How to use "for/" batch command in Dos extentionBAT
- BUG——AngularJS:Cannot set property ‘pic‘ of undefinedAngularJSUndefined
- How to update BOL entity property value via ABAP code
- How To Use Virtual Column-Based Partitioning
- How to use the Automatic Database Diagnostic Monitor(一)Database
- How to Rename a Server That Is Not a Data Store ServerServer
- React 16.0+ 新特性初探(How to use)React
- How to use ASMCA in silent mode to configure ASMASM
- How To Import Item Catalog Descriptive Element Values [ID 360850.1]Import
- [Cexpert-002] How to assign default values to fields/members of a struct?Struct
- How to create the Gold gold using RGB color values All In OneGo
- How to get and set the system socket buffer in AIXAI
- How the web worksWeb
- ASP.NET Web Page Resources OverviewASP.NETWebView
- how to use oidpasswd to admin your AS/OID account
- How to set word-wrap in VSCode?VSCode
- How To Use Google Logging Library (glog)Go
- Use Bots of Telegram as a C2 serverServer
- How to Disable or set SELinux to Permissive mode [ID 457458.1]Linux