Input PostedFile.SaveAs postback problem

P

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top