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"
}

Share this

Related Posts

Previous
Next Post »

Popular Posts