I’m pretty new with VB & ASPX.NET.
But I’m having a problem with showing the right info in a gridview.
Basically I’ve got a maintenance tool for an application. And I want to make it multi language.
This is a check for the language:
'setting the column name where to get the text resource from
Dim comment As String = "comment"
If (licentie.getlanguage() = "NL") Then
comment = "comment_NL"
End If
'Part of the sql query
sqlDataSourceGridView.SelectCommand = "select inst.categorie,inst.term_id,inst.term_result,inst." + comment + ", ETC.....
So far this works. But in my template I’ve got the following code in the gridview:
<asp:Label ID="LabelType" runat="server" Text='<%# Bind("Comment") %>' />
So my question is, How do I set the column ‘comment_NL’ when the language is set ‘NL’ in the bind?
Just give a Column Alias for
inst.commentandinst.comment_NLby usingASin your Select Query