示例#1
0
        protected void BindModelDdl(string make, string model, string other)
        {
            List <ModelLookup> models = ModelLookup.GetAllModelsLookup(make);

            DdlModel.DataSource = models;
            DdlModel.DataBind();
            if (model != "")
            {
                if (models.Select(m => m.Model).ToString() == model)
                {
                    DdlModel.SelectedValue = model;
                }
                if (model == "Other")
                {
                    RfvModelOther.Enabled = true;
                    RfvModelOther.Visible = true;
                    TxtModelOther.Enabled = true;
                    TxtModelOther.Visible = true;
                    TxtModelOther.Text    = other;
                }
            }
        }