ASP Net Controls ASP.Net Tutorial

<%@ Page Language="C#" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    protected void RadioButton_CheckedChanged(object sender, EventArgs e)
    {
        RadioButton selectedRadioButton = (RadioButton)sender;
        lblResult.Text = selectedRadioButton.Text;
    }



    RadioButton AutoPostBack


    
    

    How did you hear about our Website?
    

            

  •                     id="rdlMagazine"
                Text="Magazine Article"
                GroupName="Source"
                AutoPostBack="true"
                OnCheckedChanged="RadioButton_CheckedChanged"
                Runat="server" />
            

  •         

  •                     id="rdlTelevision"
                Text="Television Program"
                GroupName="Source"
                AutoPostBack="true"
                OnCheckedChanged="RadioButton_CheckedChanged"
                Runat="server" />
            

  •         

  •                     id="rdlOther"
                Text="Other Source"
                GroupName="Source"
                AutoPostBack="true"
                OnCheckedChanged="RadioButton_CheckedChanged"
                Runat="server" />
            

  •     

    
            id="lblResult"
        Runat="server" />