dropdownlist in listview
<p>query needed to update the values in dropdownlist which is inside the listview.
then the values of dropdownlist should be filled particular table in database using c#,ASP.NET</p>

<p>protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        float TrSsb;
        float AchSsb;
        if (e.CommandName == "Update")
        {
            TextBox txtSysmoid = (TextBox)e.Item.FindControl("txtSysmoid");
            DropDownList drpRegion = (DropDownList)e.Item.FindControl("drpRegion");
            DropDownList drpMoName = (DropDownList)e.Item.FindControl("drpMoName");
            TextBox txt1stWeekTar = (TextBox)e.Item.FindControl("txt1stWeekTar");</p>

<pre><code>        TextBox txt1stWeekAch = (TextBox)e.Item.FindControl("txt1stWeekAch");
        TextBox txt2anWeekTar = (TextBox)e.Item.FindControl("txt2anWeekTar");
        TextBox txt2anWeekAch = (TextBox)e.Item.FindControl("txt2anWeekAch");
        TextBox txt3rdWeekTar = (TextBox)e.Item.FindControl("txt3rdWeekTar");
        TextBox txt3rdWeekAch = (TextBox)e.Item.FindControl("txt3rdWeekAch");
        TextBox txt4thWeekTar = (TextBox)e.Item.FindControl("txt4thWeekTar");
        TextBox txt4thWeekAchv = (TextBox)e.Item.FindControl("txt4thWeekAchv");
        Label lblTotlTar = (Label)e.Item.FindControl("lblTotlTar");
        Label lblTotlAchv = (Label)e.Item.FindControl("lblTotlAchv");

        float Trnumber1 = float.Parse(txt1stWeekTar.Text);
        float Trnumber2 = float.Parse(txt2anWeekTar.Text);
        float Trnumber3 = float.Parse(txt3rdWeekTar.Text);
        float Trnumber4 = float.Parse(txt4thWeekTar.Text);
        //float Trtotal = float.Parse(lblTotlTar.Text);

        TrSsb = Trnumber1 + Trnumber2 + Trnumber3 + Trnumber4;

        lblTotlTar.Text = TrSsb.ToString();

        float Achnumber1 = float.Parse(txt1stWeekAch.Text);
        float Achnumber2 = float.Parse(txt2anWeekAch.Text);
        float Achnumber3 = float.Parse(txt3rdWeekAch.Text);
        float Achnumber4 = float.Parse(txt4thWeekAchv.Text);
       // float Achtotal = float.Parse(lblTotlAchv.Text);

        AchSsb = Achnumber1 + Achnumber2 + Achnumber3 + Achnumber4;

        lblTotlAchv.Text = AchSsb.ToString();


        if (TrSsb &gt;= AchSsb)
        {

            string updateCommand = "update om_DailyMoWiseCollection_Rpt set om_Region = '" + drpRegion.SelectedValue + "',om_Mo_Name = '" + drpMoName.SelectedValue + "',om_1stWeek_Target = '" + txt1stWeekTar.Text + "',om_1stWeek_Achv = '" + txt1stWeekAch.Text + "',om_2ndWeek_Target = '" + txt2anWeekTar.Text + "',om_2ndWeek_Achv = '" + txt2anWeekAch.Text + "',om_3rdWeek_Target ='" + txt3rdWeekTar.Text + "',om_3rdWeek_Achv ='" + txt3rdWeekAch.Text + "',om_4thWeek_Target ='" + txt4thWeekTar.Text + "',om_4thWeek_Achv ='" + txt4thWeekAchv.Text + "',om_total_Target ='" + lblTotlTar.Text + "',om_total_Achv ='" + lblTotlAchv.Text + "' Where om_sysmo_id = '" + txtSysmoid.Text + "'";
            SqlDataSource1.UpdateCommand = updateCommand;
        }
    }
</code></pre>
