if (connection.State == ConnectionState.Closed)
connection.Open();
command = new SqlCommand();
command.CommandText = "sp_Get_ControlValues";
command.CommandType = CommandType.StoredProcedure;
command.Connection = connection;
command.Parameters.AddWithValue("@uid", uid);
SqlDataAdapter daPack = new SqlDataAdapter(command);
DataSet dsPack = new DataSet();
daPack.Fill(dsPack);
//ddlPackPeriod.DataSource = dsPack;
//ddlPackName.DataSource = dsPack;
//ddlPackPeriod.DataTextField = "PackagePeriod";
//ddlPackName.DataTextField = "PackageName";
txtOldExpDate.Text = dsPack.Tables[0].Rows[0]["OldExpiryDate"].ToString();
txtNoOfExtConn.Text = dsPack.Tables[0].Rows[0]["NoOfExtraConn"].ToString();
txtAmntToPay.Text = dsPack.Tables[0].Rows[0]["Balance"].ToString();
ddlPackPeriod.DataBind();
ddlPackName.DataBind();
In 'pageload' iam alredy binded those two dropdowns and those dropdowns are cascading
so when I click on 'Suearch' button I just want to show as selected of 'UserId' col values
so How?


Khargesh RajputRank #616 · 3.9K reputationPosted Feb 20, 2015, 4:22 AM EST
If(!page.ispostback)
{
Code to bind dropdown
}
Azaad Abbas127 reputationPosted Feb 20, 2015, 9:24 PM EST
In 'Recieve_Payment.aspx' have two dropdowns 'PackPeriod' and 'PackName (cascaded with PackPeriod from databse)' and grid with 'Serach' button.
wehen i click 'search' button with 'Cid' should bind those two grids (PackPeriod,packName, PackPrice..e.t.c) and also show 'PackPeriod' and 'PackName' on dropdwons as selected but not effect before binded it...
so how?
Azaad Abbas127 reputationPosted Feb 22, 2015, 10:00 PM EST