Making an attribute similar to meta:resourcekey - 02-22-2006 , 07:05 AM
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)
"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
Is this doable in any elegant way?
Emil Christopher Melar
|Thread Tools||Search this Thread|