Latest web development tutorials

ASP.NET Text property

ListControl control Reference Manual ListControl control Reference Manual

Definition and Usage

Text property represents the value of the text items selected in the list.


Examples

The following examples get a RadioButtonList ListItem text in the control of:

<script runat="server">
Sub Change(obj As Object, e As EventArgs)
Response.Write("You selected " & rb1.Text)
End Sub
</script>

<form runat="server">
<asp:RadioButtonList id="rb1" AutoPostBack="true"
runat="server" OnSelectedIndexChanged="Change">
<asp:ListItem Value="Item 1" />
<asp:ListItem Value="Item 2" />
</asp:RadioButtonList>
</form>

The demonstration >>

ListControl control Reference Manual ListControl control Reference Manual