How to view an uploded file(pdf,doc,etc) or grab a file from db and show on the same page with some good styling for document if i upload a word file then the content of files should display as they are in the file( color,styling, alignment) with some nice centered aligned div outside it
how can i do this
Tuhin PaulPosted Mar 9, 2024, 8:27 PM
Consider implementing security measures such as authentication and authorization to control access to uploaded files and prevent unauthorized users from viewing or modifying them.
Tuhin PaulPosted Mar 9, 2024, 8:27 PM
Implement validation to ensure that only allowed file types and sizes are uploaded. This helps prevent security vulnerabilities and ensures a smooth user experience.
Madhu PatelPosted Feb 20, 2024, 10:52 AM
To achieve the functionality mentioned above, you can follow these steps:
1. Upload File: Create a file upload control in your ASP.NET web form to upload files. Handle the file upload on your server side and save the file in the database.
In demo.aspx
demo.aspx.cs
2. Retrieve File and Display: Retrieve the uploaded file from the database. Use appropriate libraries for parsing and rendering different document types (PDF, DOC, etc.).
3. Styling: Use CSS to style the container where you are displaying the document.
The actual approach may vary depending on the specific requirements as you can save the file in the database as well as on the server also, and you may need to adapt it based on the document types you are handling and your chosen libraries for rendering them.
Jayraj ChhayaPosted Feb 19, 2024, 7:46 AM
To achieve this functionality in a Dot Net application, you can follow these steps:
By combining these steps with appropriate Dot Net libraries and CSS styling, you can create a seamless experience for users to upload and view files while preserving the original document styling.