basic question from total newbie....

  • Thread starter Thread starter richard.markiewicz
  • Start date Start date
R

richard.markiewicz

Hi Guys

Thanks in advance for reading this. I'm very new to c# development.

In my webforms application (standard .aspx page), I have added an HTML
"File Field" control. This seems to do exactly what I need (let user
browse for a document on their local machine for upload).

However, I can't attach an event handler to it?

What I would like to do is, once a user has browsed for a document,
take the file path (last index of "/" ?) and write it to a text box.
This will give the document name and file extension.

So the user clicks "Browse" and picks a document, say "C:\documents and
settings\word document.doc".

Then in my text box I get "word document.doc".

If the user browses again, I would like the text box to update.

Can anyone help me get going with this?

Many thanks again,

Richard
 
Richard,
This is really an Asp.net newsgroup question rather than a C# language
question.

The HtmlInputFile control only works when a WebForm is POSTED - the fileInfo
information is received at the server.
Peter
 
Thank you Peter for your response. At least I know that I'm not going
to get anywhere with this :)

And apologies for not being able to find the right group :S

Cheers!

Richard
 

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

Back
Top