Page view counter

Dynamically add Text value to LinkButton in Skin file

Last post 11-06-2007 7:30 AM by ops_pete. 2 replies.

Sort Posts:

  • Dynamically add Text value to LinkButton in Skin file

    11-01-2007, 7:56 AM
    • Loading...
    • ops_pete
    • Joined on 01-29-2007, 7:55 AM
    • Posts 32
    • Points 23

    I'm making a multi-language site at the moment and I have all my buttons predefined in the Skin file. I know this is a server-side file and I was wondering it it would be possible to set the Text="" attribute to some C# code that would automatically render the right language?

     sort of like <asp:hyperlink runat="server Text="<%= langauage.hello %>" /> you can see what I'm getting at I just not sure how to implement it.

     Anyone got any pointers?

  • Re: Dynamically add Text value to LinkButton in Skin file

    11-02-2007, 11:02 AM
    Answer
    • Loading...
    • agriffard
    • Joined on 05-21-2007, 12:26 PM
    • Posts 72
    • Points 572

    You can't use code in skin file.

    To translate your controls, you have to use resx files :

    http://quickstarts.asp.net/QuickStartv20/aspnet/doc/localization/localization.aspx

  • Re: Dynamically add Text value to LinkButton in Skin file

    11-06-2007, 7:30 AM
    • Loading...
    • ops_pete
    • Joined on 01-29-2007, 7:55 AM
    • Posts 32
    • Points 23

    Perfect thanks.

Page 1 of 1 (3 items)