TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
halvorn
NA
33
0
Posting file/image to another page
Dec 8 2006 5:53 PM
Hello,
I am trying to post a file from one aspx to an aspx. I am able to get data values, like textboxes and filename of the file I`m uploading, but I don`t understand how to catch the datafile.
The aspx that posts the file would look something like this:
form id="form1" runat="server"
input type="file" id="image" name="picture"
asp:textbox runat="server" id="Data"
asp:button runat="server" id="buttonPost" Text="Click" PostBackUrl="upload.aspx"
form
The file that recieves data could maybe look something like this, but how do I code to get the file that is posted?
protected void Page_Load(object sender, EventArgs e)
{
//this would fetch the filename I`m uploading
string testing1= Server.HtmlEncode(Request.Form["picture"]);
//This would get data entered in the textbox
string testing = Request.Form["Data"];
}
I am able to recieve text variables, but my problem is how to recieve the posted file.
Any clue anybody?
Reply
Answers (
0
)
Using IP to selct different opening pages
How to call and execute .asp file from .aspx project?