using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Label1.Text = "What Color?";
        Label2.Text = "What City?";
        RadioButton1.Text = "Blue";
        RadioButton1.ID = "Blue";
        RadioButton1.GroupName = "rColor";
        RadioButton2.Text = "White";
        RadioButton2.ID = "White";
        RadioButton2.GroupName = "rColor";
        RadioButton3.Text = "Red";
        RadioButton3.ID = "Red";
        RadioButton3.GroupName = "rColor";

        RadioButton4.Text = "Tehran";
        RadioButton4.ID = "Tehran";
        RadioButton4.GroupName = "rCity";
        RadioButton5.Text = "Shiraz";
        RadioButton5.ID = "Shiraz";
        RadioButton5.GroupName = "rCity";
        RadioButton6.Text = "Mashhad";
        RadioButton6.ID = "Mashhad";
        RadioButton6.GroupName = "rCity";
        RadioButton6.Checked = true;

        Label3.Visible = false;
        Label3.ID = "Result";
        Label3.Text = "Result";
        Label3.Text = "";
        Button1.Text = "Submit";

    }
    protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
    {
        Label3.Text = RadioButton2.Text;

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label3.Visible = true;

      if (RadioButton4.Checked)
            Label3.Text += "," + RadioButton4.Text;
        else if (RadioButton5.Checked)
            Label3.Text += "," + RadioButton5.Text;
        else if (RadioButton6.Checked)
            Label3.Text += "," + RadioButton6.Text;

    }
    protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
    {
        Label3.Text = RadioButton1.Text;

    }
    protected void RadioButton3_CheckedChanged(object sender, EventArgs e)
    {
        Label3.Text = RadioButton3.Text;

    }
    protected void RadioButton4_CheckedChanged(object sender, EventArgs e)
    {

    }
    protected void RadioButton5_CheckedChanged(object sender, EventArgs e)
    {

    }
    protected void RadioButton6_CheckedChanged(object sender, EventArgs e)
    {

    }
}
