S
Steve Letford
Hi,
I'm parsing every Button / Label / hyperlink that is on my web forms so that
I can look at the text values and translate them. I used to do this in
VB.Net by casting everything as an object (Adapting the page inheritance
model by Johathon Goodyear):
As shown:
CType(myControl, Object).text = TranslatedVersion(CType(myControl,
Object).text)
However, If I try to do something similar with C# this code doesn't work and
I get a compile error.
i.e. ((System.Web.UI.WebControls.WebControl)myControl).Text
Any ideas of what I need to do for a similar effect in C#?
Thanks for any help.
Steve
I'm parsing every Button / Label / hyperlink that is on my web forms so that
I can look at the text values and translate them. I used to do this in
VB.Net by casting everything as an object (Adapting the page inheritance
model by Johathon Goodyear):
As shown:
CType(myControl, Object).text = TranslatedVersion(CType(myControl,
Object).text)
However, If I try to do something similar with C# this code doesn't work and
I get a compile error.
i.e. ((System.Web.UI.WebControls.WebControl)myControl).Text
Any ideas of what I need to do for a similar effect in C#?
Thanks for any help.
Steve