Changing Filename via code using FileUploader Control
Posted on 2006-04-26
This is a two fold question:
1) Could someone show me in code how to make a fileuploader control that is like the current one on the visual toolbar? The one there is fine but lets say I want to change the name of the browse button or I want to change the location of the textbox for the path. I don't see a way of doing that in the properties so making it myself would be a better sollution I would think. I understand how to make the textbox and the onclick event but the reason I picked this control was for the fact it allowed for browsing.
2) How do you change the name of a file that has been uploaded. Lets say for instance you have dsc1001.jpg but you want the picture be matched to that of an employeeID say 7 how would you change it to 7.jpg? I know you could make filename.text or whatever = to 7.jpg but that would mess up the actual source path before upload would it not? What I'm shooting for is the ability to upload an image and then when it post to the server have the server instantly change its name to <EmployeeID>.jpg
I know how to to use the UI control but I want to see this done manual in code so it can be modified. Thanks in advance for your help.