2010-04-23 3 views
0

2005 년 비주얼 스튜디오에서 방금 이력서 업로드를위한 새 폴더를 만들었습니다. 방금이 폴더에 이력서를 몇 개 올렸습니다 ... 이제 특정 사용자의 이력서를 가져오고 싶습니다. 어떻게 할 수 있습니까? 경로 이름을 저장하고 검색 할 테이블을 만들 필요가 있습니까? ... 가능한 경우 asp.net 2005 대 폴더에서 이력서를 검색 할 수있는 코드를 제공하십시오.asp.net에서 이력서 검색

답변

1

나는 데이터베이스에 경로를 저장하는 것을 선호하지만 반드시 그렇지는 않습니다. 이름이 resume [id] .txt 인 파일을 저장할 수 있습니다. 예 : resume1.txt.

using System.IO; 
using System.Text; 

... 

string folderName = "resume"; 
int resumeID = 1; //userID 
TextReader textReader = new StreamReader(Request.PhysicalApplicationPath + [email protected]"\resume"+resumeID+".txt",Encoding.UTF8); 
string resume = textReader.ReadToEnd(); 
textReader.Close(); 
+0

어떻게 파일 경로 이름을 데이터베이스에 저장할 수 있습니까? – Domnic

관련 문제