Click here to Skip to main content
13,292,205 members (59,658 online)
Rate this:
Please Sign up or sign in to vote.
See more:
hi all
on content page , i have updatepanel i am using 3 fileupload controls.on button click event i am saving files on server side ie in my project , i created a folder "myfiles".in "myfiles" folder i am saving all d 3 files, at d same time i have to retrieve complete path of each of can i do code is
protected void btnSubmit_Click(object sender, EventArgs e)
   HttpFileCollection hfc = Request.Files;
   for (int i = 0; i < hfc.Count; i++)
      HttpPostedFile hpf = hfc[i];
      if (hpf.ContentLength > 0)
         hpf.SaveAs(Server.MapPath("myfiles") + "\\" + Path.GetFileName(hpf.FileName));

i am unable to save all d files n myfies folder....pls help me ou in coding
Posted 15-Feb-13 6:24am
Updated 15-Feb-13 7:06am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think you need a trigger for your update panel. The target control id should be the button that uploads the file.
<asp:UpdatePanel runat="server">
//Your code in here with btnUploader
    <asp:PostBackTrigger ControlID="btnUploader" />
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

This article here on CP may help: File Upload in Update Panel[^]

NOTE: A quick google search returned me this result on the first page...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171207.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100