Showing posts with label fileupload. Show all posts
Showing posts with label fileupload. Show all posts

Saturday, March 24, 2012

about file upload2

Hi,

I have a fileupload control inside update panel however I don't need to upload any file I just need the file path and filename etc...

eventhough I can see it pastes the path inside the fileupload text part, I can't read it programmatically..

Thankss.

Why do you need the path to a file on the client computer? You can't read a file from the client computer anyway. What are you trying to achieve?


Dim instance As FileUploadDim value As Stringvalue = instance.FileName
.....................
 FileUpload.FileName:Gets the name of a file on a client to upload using theFileUpload control.

gridview:

Dim instance As FileUploadDim value As Stringvalue = instance.FileName
.....................
 FileUpload.FileName:Gets the name of a file on a client to upload using theFileUpload control.

Note that the original posted wanted the filename AND the path..


alexdresko:

Why do you need the path to a file on the client computer? You can't read a file from the client computer anyway. What are you trying to achieve?

This question reminded me how dumb I am :) thanks..

Well I'm coding a webmail interface and my mail server COM API asks for the path but this path is my server's path not the clients :D ok..

But if I know the path somehow; couldn't I upload the file programmatically? without fileupload control, I mean ok it ease the life but if it doesn't work inside an update panel how can I come up with?

Thanks for the reply..


No, you have to use the fileupload control. When the page posts back, you can save the file they uploaded to your server and from THAT you can determine the path to pass to your COM API.

Make sense?


Yes got it;

Thanks..

So is there anyway to do it with updatepanel?


No. You have to wrap your fileupload control within another updatepanel and set EnablePartialRendering = False. Supposedly there are other workarounds, and I know there is at least one third party AJAX enabled upload control, but the built-in fileupload control doesnt work with ajax..


Thanks for the reply;

Do you mean EnableViewState=False?? cause I couldn't find such property (EnablePartialRendering=False)

Wednesday, March 21, 2012

A Question about Atlas Update Panel

I have a questio about atlas update panel!

I upload files with ms FileUpload control in the Atlas UpdatePanel, but always failed. I donnot know why. It's weird, when I set the ScriptManager EnablePartialRendering = false, everything is OK! what's wrong with my UpdatePanel?


Thanks for your help?

Many thanks!

Chinese boy!

Unfortunatelly you cannot use fileupload control within updatepanel.

I am pretty sure it was discussed here a time ago, try to find it here, there is more description why it is not possible

Nice day

Milo


oh..My!!

Thanks for your reminding! anyway it's a big flaw of MS atlas. could you tell me where the discuss post was? I want to know more about this bug!

Thank you again!


HI liuguoping

some note in documentation can be found here:http://atlas.asp.net/docs/Server/Microsoft.Web.UI/UpdatePanel/DeclarativeSyntax.aspx

and some threads in forum dealing with it are i.e. here:

http://forums.asp.net/thread/1301989.aspx
http://forums.asp.net/thread/1321664.aspx
http://forums.asp.net/thread/1361452.aspx

You will be able to find more, try to put "uploadfile updatepanel" into top right search textbox on this page.

Nice day,

Milo


Thanks a lot!