locked
Concatenate Resources inline RRS feed

  • Question

  • User-1518524124 posted

    Is there a way to concatenate resources in inline script.  For example I have the following

    <asp:Label ID="Label4" Text="<%$ Resources:Labels, NOTE %>" runat="server" AssociatedControlID="spnNote"></asp:Label>

    Note is Global resource used by several aspx pages.  In some instances it is used as a grid header, but here it is used as a label for a Note textbox.  However I would like to concatenate a colon (":") to the end of the string in this case.  Instead of having two entries in the resource file one as Note and the other as Note: , I would like to just have the one entry and then to display a colon when needed. Is this possible?  I have tried the following, but it doesn't work.

    Text="<%$ Resources:Labels, NOTE %> :"


    I realize I can accomplish this in the code-behind, but it would be nice to be able to include this inline. Any suggestions?

    Thursday, April 1, 2010 2:42 PM

Answers

  • User-1636183269 posted

    I think you can override resource class in which you can merge label and note, and set in other property, and bind with resource. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 1, 2010 10:47 PM

All replies

  • User-1636183269 posted

    I think you can override resource class in which you can merge label and note, and set in other property, and bind with resource. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 1, 2010 10:47 PM
  • User-1518524124 posted

    I am not sure I understand what you mean by overriding the resource class.  Do you have an example of what you are referring to?


    Thanks for the help!

    Monday, April 5, 2010 10:01 AM