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?

Azaad AbbasPosted Feb 23, 2015, 3:00 AM
Azaad AbbasPosted Feb 21, 2015, 2:24 AM
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?
Khargesh RajputPosted Feb 20, 2015, 9:22 AM
If(!page.ispostback)
{
Code to bind dropdown
}