Upload file object Problem in Repeater

T

tshad

I have the following object that uploads files:

<input id="MyFile" style="width:100px" type="File"
onClick="UploadFile" runat="Server">

in my Repeater control. And it doesn't seem to work.

I need to save the file automatically when the file is uploaded. Normally,
you would have an Upload button to do this, but I need it to do it right
away.

I added the onClick property, but as soon as I put my mouse in the textbox,
I get a popup that says there is UploadFile is undefined. But it is there.

I assume that it thinks there is a Javascript procedure (which there isn't).

Is there a way to make this work correctly?

Thanks,

Tom
 
B

Bruce Barker

the onclick is a client side event, thus the scripting error.

-- bruce (sqlwork.com)
 
T

tshad

Bruce Barker said:
the onclick is a client side event, thus the scripting error.

That was what I figured.

All the examples of setting up the upload object, necessitate 2 steps,
pressing the browse button and then an Upload button to actually upload the
file.

I was trying to find a way to do it with one step (hitting the browse button
would get the file and upload it).

Thanks,

Tom
 

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

Top