Update any controls' Text for the specified language I would like to optimize the below code The only difference is the datatypes RadioButton, Label, and Button. Outside the method I have an loop that iterates over all the controls in the aspx-page. I have the limitation of .NET 3.5. The code is intended to set language relevant strings on the controls of a certain type in a aspx-page without having to name each control.

using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
...
public partial class MyUserControl : UserControl
...

    private static void SetTextOnControls(MyLanguageTexts keys, ControlCollection theControls)
    {
        foreach (Control control in theControls)
        {
            SetTextOnControl(keys, control);
        }
    }

    private static void SetTextOnControl(MyLanguageTexts keys, Control control)
    {

        if (control is RadioButton)
        {
            try
            {
                (control as RadioButton).Text = SPContext.Current.Web.Locale.LCID == 1033 ?
                    DataBinder.Eval(keys.en, control.ID).ToString() :
                    DataBinder.Eval(keys.sv, control.ID).ToString();
            }
            catch (Exception)
            {
                (control as RadioButton).Text = "Key not found: " + control.ID;
            }
        }
        else if (control is Label)
        {
            try
            {
                (control as Label).Text = SPContext.Current.Web.Locale.LCID == 1033 ?
                DataBinder.Eval(keys.en, control.ID).ToString() :
                DataBinder.Eval(keys.sv, control.ID).ToString();
            }
            catch (Exception)
            {
                (control as Label).Text = "Key not found: " + control.ID;
            }
        }
        else if (control is Button)
        {
            try
            {
                (control as Button).Text = SPContext.Current.Web.Locale.LCID == 1033 ?
                DataBinder.Eval(keys.en, control.ID).ToString() :
                DataBinder.Eval(keys.sv, control.ID).ToString();
            }
            catch (Exception)
            {
                (control as Button).Text = "Key not found: " + control.ID;
            }
        }

        SetTextOnControls(keys, control.Controls);
    }
Try using the dynamic keyword (.NET 4.5). Since you just updated the question with information that you are limited to 3.5, I suggest using reflection to get the Text property of the control. 

var textAwareControl = (dynamic)control;
try
{
    textAwareControl.Text = SPContext.Current.Web.Locale.LCID == 1033 ?
    DataBinder.Eval(keys.en, control.ID).ToString() :
    DataBinder.Eval(keys.sv, control.ID).ToString();
}
catch (RuntimeBinderException) {
    // throw;
    // throw, or ignore, or make sure to only dispatch compatible controls to this method
}
catch (Exception)
{
    textAwareControl.Text = "Key not found: " + control.ID;
}