Dropdownlist data not insert in query
<p>I select the <code>DropDownList</code> value to insert in query but the value remains blank in query and due to empty value in where condition not any result outcome. I do with different tricks but remain empty</p>

<pre><code>if (chkBoxChanl.Checked)
{
    sql += " and channelName = '" + ddlChannel.Text + "' ";
}
if (chkBoxDate.Checked)
{
    sql += " and transmissionDate_ between '" + tbFrom.Text + "' and '" + tbTo.Text + "'";
}
if (chkBoxProgrm.Checked)
{
    sql += " and programName ='" + ddlProgram.Text + "'";
}
if (chkBoxParty.Checked)
{
    sql += " and partiesName like '%" + ddlParty.SelectedValue + "%'";
}
if (chkBoxPerson.Checked)
{
    sql += " and personsName like '%" + ddlPerson.SelectedItem + "%'";
}
if (chkBoxProvince.Checked)
{
    sql += " and ProvinceName like '%" + ddlProvince.SelectedItem + "%'";
}
if (chkBoxCity.Checked)
{
    sql += " and CityName like '%" + ddlCity.Text + "%'";
}
</code></pre>

<p>Like</p>

<ul>
<li><code>ddlProgram.Text</code></li>
<li><code>ddlProvince.SelectedItem</code></li>
<li><code>ddlPerson.SelectedValue</code>
selected <code>DropDownList</code> value is shown empty in query.</li>
</ul>

<p>What can I do to add the selected value in query? Please help me!</p>

<p>I check  that when I select the dropdownist values which come on first load then 2md time after press search button dropdownlist values empty and when I press search button it first run Page_Load function and if(!IspostBack) is execute then all dropdownlist selected values become empty which cause to empty values in where clause. Now I want that when I press search button dropdownlist values remain loaded which will resolve the issue to become enpty dropdownlist values. Please guide me further </p>
