i need to get the filename from my input id is Announcement_PIC, but it always return null when i try to get the filename. below is my code:
Front side:
<input type="file" runat="server" class="textboxTabsFiles" ID="Announcement_PIC"/>
Backend: i've already included the below in the partical class:
protected System.Web.UI.HtmlControls.HtmlInputFile File1;
protected System.Web.UI.HtmlControls.HtmlInputButton Submit1;
This is how i'm currently getting my filename
string fn = System.IO.Path.GetFileName(Announcement_PIC.PostedFile.FileName).ToString();
Edit: my file upload is placed inside a JQuery tabs and using the asp fileupload it also has problem getting the file name, thus i tried using input file
RSSfeed, this question's title creates a file up-loader box like the one here: File Upload. Pretty nifty.