2013-06-17 5 views
0

위치 경로를 얻는 방법 mylocation.txt 파일에 액세스하려면이 파일은 현재 E : 드라이브에 있습니다.위치 경로 가져 오기 설치

[CustomAction] 
    public static ActionResult FillList(Session xiSession) 
    { 

    //Can i get store mylocation.txt into application root instead of E location 
     string path = "Mylocation.txt"; 

     // Open the file to read from. 
     string[] readText = File.ReadAllLines(path); 

     foreach (string s in readText) 
     { 
      //Console.WriteLine(s); 
      FillComboBox(xiSession, s, s); 
     } 
     xiSession["COUNTRIES"] = "--Select Location--"; 
     return ActionResult.Success; 
    } 

내가 mylocation.txt를 호출 할 수있는 방법을 대신 E 따로 장소의 응용 프로그램 루트에 저장 mylocation.txt를받을 수 있습니까? 기본적으로 내가 원하는 설치가되면,이 텍스트 파일에서 combox의 값을 얻을 수 있습니다 진행 중입니다.

답변

0

사용자 지정 작업 프로젝트에 리소스 파일로 Mylocation.txt을 첨부합니다. 자세한 내용은 discussion에서 확인하십시오.

+0

답장을 보내 주셔서 감사합니다. – reapen