What can help AJAX handle simple file operation?

I'm using asp.net & vb.net in Visual Studio 2005 & IE6.  I have a web application that uses the FileUpload component to choose a file on the hard disk, process the file, and then return a message in the Label to indicate that the process is done.  It works fine.  But I then made it an AJAX application in order to add a simple animation with the AJAX UpdateProgress control, and it failed.  It turns out there is a Microsoft bug where several components won't work with the AJAX component, and the FileUpload component turns out to be one of them.  VERY DISAPPOINTING.  What I'm trying to do is so simple and rudimentary, but AJAX cannot handle it.  Amazing.

My Web app merely uses the path & filename from the FileUpload control and puts it in a variable, but gives the "Object reference not set to an instance of an object" when I try to do that with AJAX:
Protected Sub btnProcess_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnProcess.Click
    strDownloadDumpFile = FileUpload1.PostedFile.FileName   'Full file and path.


So it begs the question - is there another component that will give a dialog box that will work with AJAX?  I'm including a Word doc that shows the problem, but the only thing I want to know is what WILL do the simple, basic operation I want?   Thank you.
Experts-Exchange-Bug-in-MS-AJAX-.doc
psmithphilAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vs1784Commented:
FileUpload control will not work with AJAX.

One possible solution is to post the file programmatically to one hidden IFRAME and then get it processed using AJAX and modify the output.

So basically upload file using some other method and other things remains as it is.

Hope it helps

Thanks
0
psmithphilAuthor Commented:
Thanks vs1784, but I'm actually not trying to upload a file, just get the path & filename into a variable.   That's all.  Then I mereley process the file.

I don't know what you mean with using a hidden IFRAME.  Could you elaborate so that I could try it?  Thank you.
0
vs1784Commented:
AJAX can not post the file content to page and because of that you will not find anything in control, not even name of file.

By hidden IFRAME i meant that you can use one IFRAME in page which holds the same page and when you want to upload file you can post your page to that IFRAME as target so your page will not refresh and you will get the file at server too.

Hope it answers your question.

Thanks
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

psmithphilAuthor Commented:
Well, I never heard of IFRAME, so I will have to Google it and study it.  If you know some good web sites, you might let me know.  I'll get back with you to see if this worked with AJAX.

I developed this application very quickly.  But once again Microsoft's failure has turned this "Rapid Application Development" into "Very slow and time-wasting Application Development".   I shouldn't have to jump through all these hoops and waste my time due to something that should be simple and quick.

Please know I appreciate your help very much.
0
vs1784Commented:
Actually File Upload control would always have problem with AJAX.

Below are some links you might be interested in, first link uses different method i.e. XML HTTP to transfer the file. You can use it if you only want to transfer file name.

http://www.codeproject.com/KB/aspnet/AJAXUpload.aspx
http://www.webtoolkit.info/ajax-file-upload.html

Hope it helps

Thanls
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
psmithphilAuthor Commented:
Thank you very much.  I will study up on this and let you know what I discover.  I will continue with my VS&TW Application Development.
0
psmithphilAuthor Commented:
I haven't abandoned it, I just never have figured out how to get the IFRAME working.  So I don't know if vs1784's solution will work for me.  

I don't know where to go forward with this.  If your recommendation is to award points to vs1784, I am all for it.

I appreciate the experts' attempts to help me.  I'm just sorry I couldn't figure it out and respond in an appropriate manner.

And TheLearnedOne, thank you for volunteering to clean up stuff like mine.  I apologize for making work for you that you shouldn't have to do.
0
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.