I have created database which has columns
- MemName
- monthlyAmt
- CurrentInstAmt
I have bound the Memname column with a DropDownList box;
onselection of memname value in DropDownList box, the corresponding values of currentInstAmt and monthlyamt should be displayed in Textbox.
I am beginer in asp.net
code -
DataSet dsMemname = new DataSet();
try
{
con.ConnectionString = strcon;
con.Open();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "usp_Memcollection";
SqlDataAdapter adp = new SqlDataAdapter(cmd.CommandText, con);
adp.Fill(dsMemname);
ddlmemname.DataTextField = "MemName";
ddlmemname.DataSource = dsMemname;
ddlmemname.DataBind();
}
catch (Exception ex)
{
throw ex;
}