Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7782383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:31:34+00:00 2026-06-01T19:31:34+00:00

I have an Attachments table in the DB where there is a filename and

  • 0

I have an Attachments table in the DB where there is a filename and filedata that is in varbinary format. On the c# end, I need to convert this data to string and depending on the MIMEType, create a downloadable .xls/.pdf file. What is the best way to do this? Can I use ActionLink to do this? I’m new to using MVC and do not have an idea of the best approach for this. Any suggestions would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:31:36+00:00Added an answer on June 1, 2026 at 7:31 pm

    I would bypass converting to a string and just worry about returning the correct mime type.

    Check out this question:

    byte[] to File Type in MVC 3

    You just need to determine the content type to set the mime type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this strings saved in my mysql database in format like: /uploads/attachments/18/105/WordPress_3_Cookbook.pdf Now,
I have some code that allows users to upload file attachments into a varbinary(max)
Suppose that we have the following partial ER diagram: Notice that the attachments table
I have an small ASP.NET application that reads data from a table and sends
I have an old table that I'm working with, which looks like this: +------------------+--------------+------+-----+---------+-------+
I'm working on an application that will have attachments, and I would like to
I have an application that will mail users attachments of text files. Receiving users
I have created a custom workflow activity that copies attachments from a case to
We have a mechanism that lets a user view available Accelerators (attachments) for a
I have made a php page that sends an email message with multiple attachments.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.