C
CSINVA
Can't seem to get this to work, maybe someone can put me in the
correct direction. I was thinking that "lng =
ddlWealth.SelectedItem.Text" would pass the item either "en" for
english or "es" for spanish and then return the movie back on the
screen "lblLang.Text = sMid", but all I get is the number 5.
Here is what the asp page looks like:
<aspropDownList ID="ddlWealth" runat="server" Width="78px">
<asp:ListItem Value="en">English</asp:ListItem>
<asp:ListItem Value="es">Espanol</asp:ListItem>
<asp:ListItem Value="de">Deutsch</asp:ListItem>
</aspropDownList>
<asp:Button ID="btnGo" runat="server" Text="Go"
OnClick="buildurl" /><br />
<br />
<asp:Label ID="lblLang" runat="server" Width="153px"></
asp:Label><br />
<br />
Public Function Build_Movie(ByVal lng)
Dim iCase As String = lng
Dim movie As Integer = 5
Select Case iCase
Case "en"
movie = "55950"
Case "es"
movie = "55951"
End Select
Return movie
End Function
Protected Sub buildurl(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ddlWealth.TextChanged
Dim lng As String
lng = ddlWealth.SelectedItem.Text
Dim sMid As Integer
sMid = Build_Movie(lng)
lblLang.Text = sMid
End Sub
correct direction. I was thinking that "lng =
ddlWealth.SelectedItem.Text" would pass the item either "en" for
english or "es" for spanish and then return the movie back on the
screen "lblLang.Text = sMid", but all I get is the number 5.
Here is what the asp page looks like:
<aspropDownList ID="ddlWealth" runat="server" Width="78px">
<asp:ListItem Value="en">English</asp:ListItem>
<asp:ListItem Value="es">Espanol</asp:ListItem>
<asp:ListItem Value="de">Deutsch</asp:ListItem>
</aspropDownList>
<asp:Button ID="btnGo" runat="server" Text="Go"
OnClick="buildurl" /><br />
<br />
<asp:Label ID="lblLang" runat="server" Width="153px"></
asp:Label><br />
<br />
Public Function Build_Movie(ByVal lng)
Dim iCase As String = lng
Dim movie As Integer = 5
Select Case iCase
Case "en"
movie = "55950"
Case "es"
movie = "55951"
End Select
Return movie
End Function
Protected Sub buildurl(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ddlWealth.TextChanged
Dim lng As String
lng = ddlWealth.SelectedItem.Text
Dim sMid As Integer
sMid = Build_Movie(lng)
lblLang.Text = sMid
End Sub