protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                if (String.IsNullOrEmpty(this.Request.QueryString["IsAssociateCurrency"]))
                {
                    throw new IndException(ApplicationMessages.MessageWithParameters(ApplicationMessages.EXCEPTION_COULD_NOT_GET_PARAMETER, "IsAssociateCurrency"));
                }
                if (this.Request.QueryString["IsAssociateCurrency"] != "0" && this.Request.QueryString["IsAssociateCurrency"] != "1")
                {
                    throw new IndException(ApplicationMessages.EXCEPTION_WRONG_ASSOCIATE_CURRENCY_PARAMETER);
                }
                if (String.IsNullOrEmpty(this.Request.QueryString["AmountScaleOption"]))
                {
                    throw new IndException(ApplicationMessages.MessageWithParameters(ApplicationMessages.EXCEPTION_COULD_NOT_GET_PARAMETER, "AmountScaleOption"));
                }

                InitialBudgetOtherCosts otherCosts = SessionManager.GetSessionValueRedirect(this, SessionStrings.INITIAL_OTHER_COSTS) as InitialBudgetOtherCosts;
                //If other costs is null, the redirect does not take place immediately
                if (otherCosts != null)
                {
                    //initialize controls to empty string before loading from database
                    InitializePopupControls();
                    InitialBudgetOtherCosts existingOtherCosts = SessionManager.GetOtherCost(this, otherCosts);
                    if (existingOtherCosts == null)
                    {
                        otherCosts.IsAssociateCurrency = this.Request.QueryString["IsAssociateCurrency"] == "1" ? true : false;
                        DataSet ds = otherCosts.GetAll(true);
                        LoadValues(ds);
                    }
                    else
                    {
                        LoadValues(existingOtherCosts);
                    }
                }
            }
        }
        catch (IndException exc)
        {
            ShowError(exc);
            return;
        }
        catch (Exception exc)
        {
            ShowError(new IndException(exc));
            return;
        }
    }