You can check the file extension of the URL of the uploaded file and if its not .xls, then you can throw a msgbox or repsonse.write to inform the user to upload only xls files.
the input type=file's textbox is not settable, i mean you cant set values so may be you can alert the user and once they select a different (excel) file, the url will be overwritten.
if you want the code to check the file extension, i can give you.
On the client side, you can access the path to the file as a string in the
"value" attribute of the "input type=file" field for uploading your file,
prior to submitting the form, as soon as they select it (using the
"onpropertychange" event handler for the "input type=file" element). It is a
string. Check the extension, and don't allow the user to submit the form
unless the form field is empty or the value has the correct file extension.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
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.