FileUpload and "error on page"

J

Jo

Hi all,

I've created a FileUpload in the footer of a Gridview.
The only thing I want to do with this, is to pick a file with the
Browse-button or to fill in a filename myself (without the
Browse-button, but only the filename, not the filepathe!).

Using the Browse-button works fine, but when I just write the filename
(like "test.txt") in the textbox, IE is gives me "error on
page"-message in the left corner and when I click on this for more
details, it says "access denied".

When I write "/test.txt" in tthe textbox, this error doesn't occur and
I can keep on debuggen and so.

The only thing I need is a filename to store in a database, I don't
want to upload files or so.

Please, can anyone help me on this?

Thank you in advance!

Regards,
Jo
 
P

Patrick.O.Ige

Do you have the right permission set in your SQl server.
Check that
Are storing the file itself or just the string name?
Patrick
 
P

Patrice

Without the path IE can't find the file.

As you don't upload, do you need the file to be an actual file ? If yes, you
have to fill the full path so that IE can make sure the file exists. There
is nothing that prevent you to strip down this info afterwards (also it
could be interesting to avoid uploading the file if you have no usage for
it).

Another option would be to use just a textbox. Additionaly you could still
use an hidden input file to provide the UI for the browse functionality (but
it could perhaps give layout problem as it's likely recent browser are more
restrictive and in particular won't likely allow to use an input file that
is hidden). Also in this case, the file may or may not exists client side...
 

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

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,294
Latest member
LandonPigo

Latest Threads

Top