protected void loadAddrAndCurrDetails() { AddressDetails addrObj = BackEndObjects.AddressDetails. getAddressforMainBusinessEntitybyIdDB(Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString()); Label_Addr1.Text = addrObj.getAddrLine1(); loadLocalityDetails(addrObj.getLocalityId()); Dictionary <String, Currency> currDict = BackEndObjects.Currency.getAllCurrencyDetailsDB(); foreach (KeyValuePair <String, Currency> kvp in currDict) { ListItem lt = new ListItem(); lt.Text = ((Currency)kvp.Value).getCurrencyName(); lt.Value = ((Currency)kvp.Value).getCurrencyId(); DropDownList_Base_Curr.Items.Add(lt); if (addrObj.getBaseCurrencyId() != null && !addrObj.getBaseCurrencyId().Equals("") && addrObj.getBaseCurrencyId().Equals(((Currency)kvp.Value).getCurrencyId())) { DropDownList_Base_Curr.SelectedValue = lt.Value; } } }