Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/05/2013, 11:57
th3r0rn
 
Fecha de Ingreso: noviembre-2007
Mensajes: 504
Antigüedad: 16 años, 5 meses
Puntos: 2
Response.Write no funciona erro: Unreachable Code Detected

Hola, en el siguiente codigo intento hacer un wirte de la siguiente manera:
Código C#:
Ver original
  1. Response.Write("df" + objBank[0].city);
incluso si hago un Response.write("Hola")
no me lo muestra, es decir no da error al momento de llamar al metodo pero no imprime esa linea, y buscando en el codigo marca que no lo muestra por la siguiente razon: Unreachable Code Detected
Eso es lo que marca en el write :(
Alguien sabe porque?

Código C#:
Ver original
  1. //Metodo
  2.     public List<BankList> getSAP(String search)
  3.     {
  4.  
  5.         string param = "";
  6.         param = search.ToString();
  7.         try
  8.         {
  9.             //RfcDestination prd = RfcDestinationManager.GetDestination("IDES");
  10.            
  11.             BankList objBankList = new BankList();
  12.             List<BankList> objBank = new List<BankList>();
  13.             RfcRepository repo = prd.Repository;
  14.             IRfcFunction companyBapi = repo.CreateFunction("BAPI_BANK_GETLIST");
  15.             companyBapi.SetValue("BANK_CTRY", param);
  16.             companyBapi.SetValue("MAX_ROWS", 2);
  17.             companyBapi.Invoke(prd);
  18.  
  19.             List<IRfcStructure> irc = new List<IRfcStructure>();
  20.             IRfcTable detail = companyBapi["BANK_LIST"].GetTable();
  21.             List<string> cnt = new List<string>();
  22.  
  23.             foreach (IRfcStructure ir in detail)
  24.             {
  25.  
  26.                 objBank.Add(new MyBackendConfig().Insert(ir));
  27.             }
  28.             repo.ClearTableMetadata();
  29.             return objBank;
  30.  
  31.             Response.Write("df" + objBank[0].city);
  32.  
  33.    
  34.            
  35.            
  36.        
  37.         }
  38.         catch (Exception ex)
  39.         {
  40.             return null;
  41.         }
  42.        
  43.     }