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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- web server apache tomcat11-08-JNDI ResourcesWebServerApacheTomcat
- [Javascript] How javascript read the property?JavaScript
- Need to set ‘serverTimezone‘ propertyServer
- Dynamics 365 Web API Set Values of all Data Types using Web API in Dynamics CRM Through C#WebAPIC#
- How to use Qt Designed Ui fileQTUI
- 翻譯|How to Use the useReducer HookuseReducerHook
- Cannot set property 'innerHTML' of nullHTMLNull
- How to Use the Stdin, Stderr, and Stdout Streams in Bash
- Cannot set property ‘type‘ of null(vue)NullVue
- How to create the Gold gold using RGB color values All In OneGo
- How to set word-wrap in VSCode?VSCode
- How to use “cat” command on “find” command's output?
- React 16.0+ 新特性初探(How to use)React
- BUG——AngularJS:Cannot set property ‘pic‘ of undefinedAngularJSUndefined
- How to update BOL entity property value via ABAP code
- Server returns invalid timezone. Need to set ‘serverTimezone‘ property. Idea連線mysql報錯問題ServerIdeaMySql
- Linguistics-English-Would, Should, and Could: How to Use Them CorrectlyNGUI
- How to use VS Code to debug Next.js applications All In OneJSAPP
- Use Bots of Telegram as a C2 serverServer
- How to Install and Configure VNC Server in CentOS 7VNCServerCentOS
- Quartz叢集增強版_00.How to use?(如何使用)quartz
- 【Case】ORA-20000: Unable to set values for table DBMS_TABCOMP_TEMP_UNCMP
- [Vue warn]: The data property "dialogVisible" is already declared as a prop. Use prop default valueVue
- how to move a MediaWiki wiki from one server to anotherServer
- [20190522]How to get dump or list parameters set at session level.txtSession
- kafka java.rmi.server.ExportException: Port already in useKafkaJavaServerExportException
- How to Build and Deploy a Next.js App on Apache ServerUIJSAPPApacheServer
- tomcat新增專案報錯:There are no resources that can be added or removed from the serverTomcatREMServer
- 使用req.session.xxx時出現 Cannot set property ‘xxxx‘ of undefinedSessionUndefined
- [20211012]sqlnet.ora USE_DEDICATED_SERVER=on.txtSQLServer
- Django中values()和values_list()Django
- Resources
- Unknown initial character set index ‘255‘ received from server. Initial client character set can beIndexServerclient
- 開發中遇到的bug-Cannot set property ‘__VUE_DEVTOOLS_UID__‘ of nullVuedevUINull
- Subarray Distinct Values
- 快速使用ChatGpt Web ServerChatGPTWebServer
- AndroidStudio之自定義輸出包名報錯 Cannot set the value of read-only property 'outputFile' forAndroid
- How to redirect to a specific web page after sign out from Entra IDWeb
- JavaScript 陣列values()JavaScript陣列