Making an attribute similar to meta:resourcekey

Discussion in 'ASP .Net Building Controls' started by Emil Christopher Melar, Feb 22, 2006.

  1. What i want is a more elegant way to assign _global_ resource strings.

    I can see that ControlBuilder is doing things with it.

    So I tried to inherit it and parse / remove attributes myself, but I
    found out that I couldn't do that.



    My method would be doing something like this:

    <asp:Label id="lol" runat="server" r:TextKey="Test" />
    ...

    <asp:HyperLink id="lol" runat="server" r:TitleKey="Test" TextKey="Test />

    The resource string file would be defined in a static manner
    (application_start / web.config)

    Parsing description:

    "r:" is attribute prefix like "meta:"

    Title will be extracted from r:TitleKey

    r: is the prefix, will be filteret out. Key is what it should end with,
    and will be filtered out.
    Now you are left with the attribute value which is "Test", and the
    property where you will assign it to, which is "Title".

    So then in some funny way, I want to at some point to use reflection to
    assign the resource key of "Test" on property "Title" on that control
    instance.

    Is this doable in any elegant way?

    --
    Emil Christopher Melar
     
    Emil Christopher Melar, Feb 22, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. LM
    Replies:
    1
    Views:
    7,179
    =?Utf-8?B?RFdT?=
    Mar 1, 2006
  2. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    590
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  3. Bostonasian
    Replies:
    1
    Views:
    830
    Joris Gillis
    Sep 18, 2005
  4. =?Utf-8?B?S3VydGlz?=

    Custom Resource Provider and meta:ResourceKey

    =?Utf-8?B?S3VydGlz?=, Jun 14, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,619
    =?Utf-8?B?S3VydGlz?=
    Jun 14, 2006
  5. Duane Johnson

    Meta methods to govern meta data?

    Duane Johnson, Oct 25, 2005, in forum: Ruby
    Replies:
    6
    Views:
    263
    Adam Sanderson
    Oct 28, 2005
Loading...

Share This Page