Upload docx file in asp.net
Thank you very much for your help. I am really appreciate it. Monday, February 1, PM. ToInt32 FileUpload1. Read bytecontent, 0, FileUpload1. ContentLength ; cmd. AddWithValue " file", bytecontent ; cmd. AddWithValue " content", content ; cmd. ExecuteNonQuery ; TextBox1. User posted For a single file: Use a fileupload component and store in a folder that you have done write permission let's say folder a and file b. But read first tutorials on database with asp. So, after the user submits the form on the web page, I need to modify the original docx file, and then download it to the user.
I try to store the original file as a resource file in my project, but I can't open it programatically. That's what I tried in the post controller:. But I received a System. I also don't know how to download the modified file. In a simple console application document. SaveAs2 newPath ; worked, but it doesn't seem to work for downloading. I'm not even sure that this whole way could work. If I can't use Microsoft. Word this way, please let me know. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Accept Solution Reject Solution. There is absolutely no difference what kind of file to upload. Also, in all modern file systems, there is not such think as "extension". Not anymore. This is just a Windows tradition preserved from old DOS time which is only used in Shell and "file type associations".
Your "but not able to other extension files" is probably just your illusion. Try to reproduce and describe what's going wrong in detail and you will see that the problem does not really exist. Posted May pm Sergey Alexandrovich Kryukov. NET 2. Posted May pm Abhinav S. Add your solution here. OK Paste as. Treat my content as plain text, not as HTML.
Existing Members Sign in to your account. This email is in use. Do you need your password? Submit your solution!
0コメント