How not to type control ID again in meta:resourcekey?

Posted on 2011-04-28
Last Modified: 2012-05-11

I've got a page which I need to localize to different langauges. So I used resource files and ended with a lot of controls looking like below. Most of the time, the meta:resourcekey is simply equal to control ID. Typing it twice is getting really annoying. Any way to get rid of this need while still using resource files (changing res files to some other concept would take weeks of work).

<asp:HyperLink ID="linkImportZipFile" NavigateUrl="#extractZIP" onclick="extractOpt(impMethZip);" Text="Import models from ZIP file" runat="server" meta:resourcekey="linkImportZipFile" />

Open in new window

Question by:bovlk
    1 Comment
    LVL 21

    Accepted Solution

    In my opinion, you would really have to manually enter the name of the meta:resourcekey if you are naming it the same as the control ID.

    I usually use the Generate Local Resource option under the Tools Menu to generate a new page resource file or refresh the page resource file key values when a page is modified.  Unfortunately, the Generate Local Resource option has a standard naming of "Control ID" name plus concatenated string "Resource1" (eg. Button1 ID name for button control would have Button1Resource1 for its meta:resourcekey).

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now