Validation ASP.Net Tutorial

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

    void btnSubmit_Click(Object sender, EventArgs e)
    {
        if (Page.IsValid)
            lblResult.Text = dropFavoriteColor.SelectedValue;
    }



    Show Initial Value


    
    

            id="lblFavoriteColor"
        Text="Favorite Color:"
        AssociatedControlID="dropFavoriteColor"
        Runat="server" />
    
            id="dropFavoriteColor"
        Runat="server">
        
        
        
        
    
            id="reqFavoriteColor"
        Text="(Required)"
        InitialValue="none"
        ControlToValidate="dropFavoriteColor"
        Runat="server" />
            id="btnSubmit"
        Text="Submit"
        Runat="server" OnClick="btnSubmit_Click" />
            id="lblResult"
        Runat="server" />