【发布时间】:2010-11-11 17:17:36
【问题描述】:
我有两个列表项和回发并运行一个函数。
<asp:RadioButtonList runat="server" CssClass="ccsw" ID="ccsw" AutoPostBack="true" RepeatDirection="Horizontal" OnSelectedIndexChanged="UpdateCharges">
<asp:ListItem Text="Credit Card"></asp:ListItem>
<asp:ListItem Text="Debit Card"></asp:ListItem>
</asp:RadioButtonList>
它运行函数UpdateCharges
Sub UpdateCharges(ByVal sender As Object, ByVal e As System.EventArgs)
If ccsw_1.Checked Then
lblPayText.Text = "Payment Amount = £" & Session("strTotal_DebtCharge")
Else
lblPayText.Text = "Payment Amount = £" & Session("strTotal_Debt")
End If
End Sub
我需要找出哪个被选中,然后根据它更改标签的文本。
我的代码不起作用我认为.Checked 在这种情况下不起作用。
知道如何获取列表项的值或文本吗?
谢谢
【问题讨论】: