L
Larry Bud
Newbie here, so be gentle.
I've tried writing this page a variety of ways, but can't get this to
work.
I have a drop down with monetary exchange rates.
I have a table with a bunch of columns (>20) being returned.
I bind the table to a FormView.
Wonderful
Now, I want to modify the dollars by multiplying it with the exchange
rate value. So I wrote a property function:
ReadOnly Property getCurrency() As String
Get
Dim curr As String
Dim dd As DropDownList
dd = FormView1.FindControl("currency_code")
curr = dd.SelectedItem.ToString
Return curr
End Get
End Property
For giggles (and testing) I have a label control which normally would
be databound, but since it wasn't working, I'm just displaying the
value of getCurrency() (which is why getCurrency is now returning a
string)
<asp:Label ID="Label1" runat="server" Text='<%# getCurrency()
%>'></asp:Label>
What happens is that the Label1 gets populated the first time, but as I
change the dropdown value, it's as if getCurrency never runs again. I
don't get it.
I've tried writing this page a variety of ways, but can't get this to
work.
I have a drop down with monetary exchange rates.
I have a table with a bunch of columns (>20) being returned.
I bind the table to a FormView.
Wonderful
Now, I want to modify the dollars by multiplying it with the exchange
rate value. So I wrote a property function:
ReadOnly Property getCurrency() As String
Get
Dim curr As String
Dim dd As DropDownList
dd = FormView1.FindControl("currency_code")
curr = dd.SelectedItem.ToString
Return curr
End Get
End Property
For giggles (and testing) I have a label control which normally would
be databound, but since it wasn't working, I'm just displaying the
value of getCurrency() (which is why getCurrency is now returning a
string)
<asp:Label ID="Label1" runat="server" Text='<%# getCurrency()
%>'></asp:Label>
What happens is that the Label1 gets populated the first time, but as I
change the dropdown value, it's as if getCurrency never runs again. I
don't get it.