473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Input PostedFile.SaveAs postback problem

phl
hello,

I have an input control which saves a file user specifies. Like this :
SaveCon.PostedFile.SaveAs(sDocPath)

This cause a postback which presents a problem as I want this to happen
in my business logic - so my desired postback has already happend and I
don't want it to postback again.

Is there anyway I can suppress this html control from posting back? I
have tried another workaround in vain:

File.Copy(SaveCon.PostedFile.FileName, sDocPath, true);

The problem here is that even though my file definitely exists in the
specified location. I think .Net won;t allow me to access the my disk
outside my app domain space, which is the reason why it thinks my
source file doesn't exists.
Does anyone have any ideas for this?

Cheers

Nov 19 '05 #1
0 1644

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Pai | last post by:
Hello there, Good Morning, I am facing a peculiar problem. I have the following code in the html section of my .apsx page <input type="file" runat="server" id="fileBrowse"...
2
by: news.bellatlantic.net | last post by:
I created a for with file inputs (<input type=file.../>) I named them file1, file2, file3 etc. How do I access them in the code behind without actually calling each one by name (there are 21 of...
0
by: fchiausa | last post by:
Hello, I'm having a hard time trying to manage an input type file in a datalist here is my aspx code : <INPUT type="file" id="InputImageFile2" runat="server"><br> <input type="submit"...
0
by: Alex Pet | last post by:
Hi, I have a very strange situation here. I have an aspx page through which I upoload image file in a folder. I can upload file first time successfully. when second time I try to upload same...
4
by: darrel | last post by:
I have some INPUT TYPE=FILE fields on a page. There are four of them and I'd like to validate them. They can either be empty, or need a certain filename. This is what I am doing: if...
0
by: NathetJoel | last post by:
Hi! I have a problem using the input file, what I want to do is either send the file with an attachment or upload it on the server. When I do my test on my PC everything is OK but when I put it...
0
by: Jgold7 | last post by:
Not sure which group this should go to, but here goes: I am working with a website that I am selecting files to be uploaded on one page (ex. UploadAttachment.aspx) and I need to retrieve those...
1
by: Hadar | last post by:
Hi, I'm trying to upload files and to use the revision number field of the file. By using PostedFile.SaveAs the files are uploaded. The problem is that the summary tab and the revision number...
1
by: daokfella | last post by:
I have a web usercontrol on which is a Webcontrols.FileUpload control. I expose the PostedFile property as a readonly property of the usercontrol. That way, a page has access to it. However,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.