Last post Jan 18, 2006 11:41 PM by Nibelung
Jan 18, 2006 02:08 PM|Peter Smith|LINK
Jan 18, 2006 11:41 PM|Nibelung|LINK
Your technique sounds interesting. I'm currently working on a sideproject of our application as well. We also need translation (for only a determined few - interfaced - usercontrols).
I made a table with 3 PK's. Forgive me:
-UserControlId : the usercontrolid that will be found on the invoking page (further down already)
-WebControlId : the webcontrol's unique ID withine the previous UC ID field
-Text, the text to be placed in the control that confirms with the WebControlId
Not exactly the most performing solution, but here's the glory: Put 1 control on the page and it would scan the page and iterate all usercontrols. Should the userontrol be IMyFancyTranslationUserControl, it would:
-iterate the database results for all possible controls within this UC (that is WebControlId)
-if WebControlID is found, continue to:
-WebControl check, hardcoded. Here we check the type of the WebControlId's "control". Label, DDL, whatever, we check, and translate, all in 1 class.
Hope this gave some more color to the question, and I know it's not the best solution (iterate every singly control) I'd gladly discuss anything else for this very same problem.