RadioButtonlist control:
RadioButtonlist control:-(single selection control).
Radiobuttonlist control is uses all property to dropdown list control.
Prog :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//user input element
RadioButtonList1.Items.Add(TextBox1.Text);
}
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
//display selected city
//Label1.Text = RadioButtonList1.Text;
//match radio button list element
if (RadioButtonList1.SelectedIndex==1)
{
TextBox1.Text = "Welcome user";
}
else
{
TextBox1.Text = "Sorry invalid selection";
}
}
}
}
Comments
Post a Comment