Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="form-group row">
- <label class="col-5">File1 :</label>
- <div class="col-7">
- <input type="file" name="file1" class="form-control no-border" />
- </div>
- </div>
- <div class="form-group row">
- <label class="col-5">File2 :</label>
- <div class="col-7">
- <input type="file" name="file2" class="form-control no-border" />
- </div>
- </div>
- var fileResume = string.Empty;
- var fileContract = string.Empty;
- try
- {
- if (Request.Files != null && Request.Files.Count > 0)
- {
- var path = @"uploadSpeaker";
- if (!System.IO.Directory.Exists(Server.MapPath(path)))
- {
- System.IO.Directory.CreateDirectory(Server.MapPath(path));
- }
- for (int i = 0; i < Request.Files.Count; i++)
- {
- if (Request.Files[i].ContentLength > 0)
- {
- var file = Request.Files[i];
- var fileName = string.Concat(Guid.NewGuid(), file.FileName);
- var savePath = string.Concat(path, "\", fileName);
- if (Request.Files.Keys[i] == "Resume")
- {
- fileResume = savePath;
- }
- else
- {
- fileContract = savePath;
- }
- file.SaveAs(Server.MapPath(savePath));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement