0

asp.net ページの pdf ファイルで履歴書をアップロードする方法を知りたいです。シンプルなtxtファイルをアップロードする方法と、フィールドが「、」で区切られている場合を知っています。これが私のコードです。

using System.IO;
        string uploadfile = Server.MapPath("~/uploads3/") + FileUpload1.FileName;
        FileUpload1.PostedFile.SaveAs(uploadfile);
        if (File.Exists(uploadfile))
        { 
        string inputline = "";
            using (StreamReader sr = File.OpenText(uploadfile))
            {
                while ((inputline = sr.ReadLine()) != null)
                {
                    string tempstr = inputline;
                    string firstname = tempstr.Substring(0, tempstr.IndexOf(","));
                    tempstr = tempstr.Substring(tempstr.IndexOf(",") + 1);
                    string lastname = tempstr.Substring(0, tempstr.IndexOf(","));
                    tempstr = tempstr.Substring(tempstr.IndexOf(",") + 1);
(...)

今、履歴書を含むpdfファイルでこれを行う方法がまったくわかりません。どうやってするか?あなたの答えを説明してください、私はsystem.ioが初めてです。再度、感謝します。

4

2 に答える 2