Rank: Newbie
Groups: Member
Joined: 1/2/2012(UTC) Posts: 6
Thanks: 1 times
|
I inserted the code into page upload int fileCount = Int32.Parse(Request.Form["PackageFileCount"]);
for ( int i = 0; i < fileCount; i++ )
{
string path = System.IO.Path.Combine(Server.MapPath("../Datfiles/"), Request.Form["SourceName_" + i]); Request.Files["File0_" + i].SaveAs(path);
}
Getting error message Value cannot be Null int fileCount = Int32.Parse(Request.Form["PackageFileCount"]);
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello Bob, Please add this if-statement to your server-side code: Code:
if (Request.HttpMethod == "POST" && Request["PackageGuid"] != null){
//… handling uploaded files …
}
|
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
1 user thanked Dmitry.Obukhov for this useful post.
|
|
|
Rank: Newbie
Groups: Member
Joined: 1/2/2012(UTC) Posts: 6
Thanks: 1 times
|
Dmitry.Obukhov wrote:Hello Bob, Please add this if-statement to your server-side code: Code:
if (Request.HttpMethod == "POST" && Request["PackageGuid"] != null){
//… handling uploaded files …
}
Thanks That worked
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Thank you for your comment. If you have any additional questions, please feel free to post them here. |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.