private void GenerateFactoryCOde() { try { string CountryCode = ddlCountry.SelectedValue; string FacCode = txtFactoryName.Text.Substring(0, 3); //string FacCode = FactoryName["0,3"].ToString("0,3"); txtFactoryCode.Text = _factorybLL.GetNewFactoryCode(CountryCode, FacCode); } catch (Exception ex) { throw ex; } }