Hi alhakimyyes,
Refer below sample.
HTML
<asp:RadioButtonList runat="server" ID="rblOptions">
<asp:ListItem Text="New" />
<asp:ListItem Text="Edit" />
<asp:ListItem Text="Exit" />
</asp:RadioButtonList>
<asp:Button Text="Add" runat="server" OnClick="OnAdd" />
Code
C#
protected void OnAdd(object sender, EventArgs e)
{
string active = "New";
if (rblOptions.Items.FindByText(active) != null)
{
rblOptions.Items.FindByText(active).Selected = true;
}
}
VB.Net
Protected Sub OnAdd(sender As Object, e As EventArgs)
Dim active As String = "New"
If rblOptions.Items.FindByText(active) IsNot Nothing Then
rblOptions.Items.FindByText(active).Selected = True
End If
End Sub
Screenshot