I need your help to display data as per the dropDownList Selection.
Please look at the following ScreeShot:-
My intention is , when I select a name from Customer Name dropDownList, I need to display the concerned room type, roomPrice and paymentType in the following dropDownList.
The SQL StoredProcedure I wrote for this function is:-
Give me the C# code to implement this query.

Abhay ShankerPosted Dec 25, 2013, 8:38 AM
Tirthak ShahPosted Dec 25, 2013, 8:33 AM
SqlConnection conn=new SqlConnection("Your Connection String");
SqlCommand cmd=new SqlCommand();
Dataset dt=new Dataset();
public Dataset Filldropdown(adminmanager obj)
{
conn.open()
cmd.CommandText="ShowbookingPeerCustomer"
cmd.commandtype=commandtype.storedprocerdure;
SqlDataAdapter adpt=new SqlDataAdapter(cmd,conn);
adpt.filldata(dt);
return dt;
}
Then In the dataset there are columns and you just give this column value to the dropdownlist.
Ex::
drppaymenttype.selectedvaue=convert.toint32(dt.rows[0]["payment Type"].tostring());