hey,
I try to put some text that I get out a property of a class into a label. That's no problem. But I have 2 exactly the same classes but the text in it is different (translation). My question is, how I can change the instance of the class (I don't know how to explain).
This works:
Dim id As Integer
id = Request.QueryString("id")
If id = 1 Then
Dim lang As Dutch
lang = New Dutch()
Label1.Text = lang.Welcome
End If
But I want something like this:
Dim id As Integer
id = Request.QueryString("id")
If id = 1 Then
Dim lang As Dutch
lang = New Dutch()
End If
If id = 2 Then
Dim lang As English
lang = New English()
End If
Label1.Text = lang.Welcome
What I want is that I can use the same label.text = lang.welcome for every class, that I don't have to type this in every if..then statement. Does anyone have some suggestions?