Move to resource in aspx files. [vs.net:2008] [build:1547]

As demonstrated in the video below the Move to resource functionality works fine in the code behind file.

But how do I get it to work in the aspx file?

http://screencast.com/t/NmQ4ZGIzZDg


Regards and thanks for a great product

0
4 comments
Avatar
Permanently deleted user

Hello Rasmus,

Now you could use "Move to resource" only for attribute value of server tag.

Example:

     <asp:Label Id="lblTest" Text="Hello" runat="server" />

Place cursor inside the Text attribute value and call "Refactor this" or "Move" refactoring action.

  • For local resource file and item name "lblTest.Hello" you will get
     <asp:Label Id="lblTest" meta:resourceKey="lblTestResources" Text="Hello" runat="server" />

  • For local resource file and item name "HelloMessage" you will get
     <asp:Label Id="lblTest" Text="<%$ Resources: HelloMessage %>" runat="server" />

  • For global resource file and any item name you will get
     <asp:Label Id="lblTest" Text="<%$ Resources: GlobalResource, HelloMessage %>" runat="server" />
0
Avatar
Permanently deleted user

Please try to use next nightly build. I fixed this error.

0
Avatar
Permanently deleted user

Thanks for the fix.

Is there any way to find and move eg. TH values to resource files?
Like below if I want to localize Product and Price

<table>
     <tr>
          <th>Product</th>
          <th>Price</th>
     </tr>
</table>

0
Avatar
Permanently deleted user

The context action "Move to resource" will be available in a aspx file in the nearest future.
Also we plan to add localization analyzer for a VB, ASPX and XAML code.

0

Please sign in to leave a comment.