<%--for this working--%>
<%--for this not working--%>
onselectedindexchanged="ddlPayBy_SelectedIndexChanged" TabIndex="18" AutoPostBack="True">
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Khargesh RajputPosted Mar 26, 2015, 2:43 AM
set initial value in second dropdown
Khargesh RajputPosted Mar 26, 2015, 3:01 AM
if (objDs.Tables[0].Rows.Count > 0)
{
ddlClass.DataSource = objDs.Tables[0];
ddlClass.DataTextField = "class_name";
ddlClass.DataValueField = "id";
ddlClass.DataBind();
ddlClass.Items.Insert(0, new ListItem("----------- Select Class -----------", "0"));
}
and apply validation as above you add initial value="0" in requiredfield validater
Azaad AbbasPosted Mar 26, 2015, 3:00 AM
Azaad AbbasPosted Mar 26, 2015, 2:53 AM
but if dropdown list dynamically bind then how to validate?