Breaking News

LightBlog

Friday, 15 January 2016

How To Validate Dropdownlist In Asp

While binding dropdownlist add the line below


dd1.Items.Insert(0, "Select");
And for validation you can write below code in button click
if (dd1.SelectedItem.Text.Trim() == "Select")
        {
            
           Label1.text = "Select Year"
        }