Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 8th, 2006, 03:03 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default file upload processed on separate page

hi, I need to upload a file using asp.net c#, but i need the form to be processed on separate page. my code (below) cant seem to see the MyFile object on the processing page, can anyone please help? Vauneen

form page:
code in code section:
void cmdPost_Click(Object src, EventArgs e ) {
 Server.Transfer("promoadd_action.aspx", true);
}
code within the form:
<input type="file" id="MyFile" runat="server" name="MyFile" class='txtinput'>

processing page:
void Page_Load(Object src, EventArgs e ) {
 if( MyFile.PostedFile != null ){
  string strFileName = MyFile.PostedFile.FileName;
  strFileName = System.IO.Path.GetFileName(strFileName);
  MyFile.PostedFile.SaveAs(Server.MapPath("./promoimages/") + strFileName);
 }
}
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
separate file location for different databases Aprile MySQL 1 September 6th, 2007 04:34 PM
Access report print each page to separate PDF file conh2so4aq Access VBA 5 July 3rd, 2006 08:00 PM
Whole Folder upload(Multi file Upload) ramasamy_rams XML 1 September 9th, 2005 12:43 PM
problem for creating the separate log file for con goel_man Apache Tomcat 0 December 19th, 2004 11:48 AM
upload doc,pdf file from ORACLE 9i on JSP page ashwinmittal Pro JSP 1 November 30th, 2004 01:18 PM



All times are GMT -4. The time now is 02:11 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.