Click here to Skip to main content
15,889,878 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my asp.net application i hava a problem in dropdownlist
I want to change selected value of dropdown list at the time of editing

my code is

DataSet _DsDetail = new DataSet();
_DsDetail = objTranDetail.GetLedgerTransactionDetail(_LedgerTransID);
_AccountLedgerID = Convert.ToInt32(_DsDetail.Tables[0].Rows[0]["RelatedAccountLedgerID"].ToString());
ddlDebitAccount.SelectedValue = _AccountLedgerID.ToString();



here _AccountLedgerIDget currecteed value but in
ddlDebitAccount.SelectedValue = _AccountLedgerID.ToString();

selectedvalue is not change it contain older value


ex:
if _AccountLedgerID is 8 then ddlDebitAccount.SelectedValue not get 8
pls help me............................
Posted

1 solution

Rebind the dropdownlist after changed the item list details.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900