Click here to Skip to main content
16,005,236 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionUploading a website Pin
IamAmit4-Aug-07 22:35
IamAmit4-Aug-07 22:35 
AnswerRe: Uploading a website Pin
Guffa5-Aug-07 0:47
Guffa5-Aug-07 0:47 
QuestionDynamic Event Pin
Ahmad Adnan4-Aug-07 20:54
Ahmad Adnan4-Aug-07 20:54 
QuestionEncrypt , Decrypt - Query string values Pin
Md Arif4-Aug-07 15:44
Md Arif4-Aug-07 15:44 
QuestionASP.Net Session storing COM object Pin
AntDorr4-Aug-07 11:10
AntDorr4-Aug-07 11:10 
QuestionContentPlaceHolder/ Masterpage Pin
Wardell4-Aug-07 9:33
Wardell4-Aug-07 9:33 
AnswerRe: ContentPlaceHolder/ Masterpage Pin
Sandeep Akhare4-Aug-07 23:56
Sandeep Akhare4-Aug-07 23:56 
QuestionDetermine Mime Type and File Name dynamically [modified] Pin
ASPnoob4-Aug-07 9:07
ASPnoob4-Aug-07 9:07 
Hi, suppose I have binary files stored in a field called Resumes and mime type for each file stored in a field called DocType. Normally if one wants to display binary data in the browser, one has to use a data reader to read the binary data after retrieving them from the database. Then put the data into a byte array, determine the file to be displayed, and determine its mime type. Then finally to display data, one can use the Response.Write() method passing in the byte array as an argument. I have done all of the above, but I'm unsure if the way I determined the mime type and the file to be displayed is correct. I've put the names of the columns in to the the code like the following.
'Normally I would use the following line of code if only one file is to be displayed Response.AddHeader("Content-Disposition", "attachment;filename=something.doc")
 'But to display many files I use the line of code below
 Response.AddHeader("Content-Disposition", "attachment;filename=Resumes")

 'I would use this if only one file is to be displayed Response.ContentType = DirectCast(AD("image/img"), String)
 'But I use the code below for multiple files
 Response.ContentType = DirectCast(AD("DocType"), String)

Can I grab data from a database like that, where I just pass in the column name as an argument? If not how should I go about it? Thank you in advance for your help.












-- modified at 17:35 Saturday 4th August, 2007
AnswerRe: Determine Mime Type and File Name dynamically Pin
Christian Graus4-Aug-07 12:59
protectorChristian Graus4-Aug-07 12:59 
GeneralRe: Determine Mime Type and File Name dynamically [modified] Pin
ASPnoob5-Aug-07 8:44
ASPnoob5-Aug-07 8:44 
QuestionDrawing chart from ASP.net2.0 data grid Pin
Malay Mukherjee4-Aug-07 8:18
Malay Mukherjee4-Aug-07 8:18 
AnswerRe: Drawing chart from ASP.net2.0 data grid Pin
Christian Graus4-Aug-07 13:09
protectorChristian Graus4-Aug-07 13:09 
QuestionExporting Data from Sql to Excel worksheet through ASP.net2.0 Pin
Malay Mukherjee4-Aug-07 8:16
Malay Mukherjee4-Aug-07 8:16 
AnswerRe: Exporting Data from Sql to Excel worksheet through ASP.net2.0 Pin
Christian Graus4-Aug-07 13:12
protectorChristian Graus4-Aug-07 13:12 
Questionhttp to https: URL Rewriting Pin
kaliem4-Aug-07 8:02
kaliem4-Aug-07 8:02 
AnswerRe: http to https: URL Rewriting Pin
Christian Graus4-Aug-07 13:16
protectorChristian Graus4-Aug-07 13:16 
QuestionHorizontal Expanding Docking Panel Pin
devil854-Aug-07 7:59
devil854-Aug-07 7:59 
QuestionCascadingDropDown Pin
itzmevishu4-Aug-07 4:32
itzmevishu4-Aug-07 4:32 
QuestionHow to handle multiple browsers in ASP.NET Pin
swapnilbhavsar4-Aug-07 2:28
swapnilbhavsar4-Aug-07 2:28 
AnswerRe: How to handle multiple browsers in ASP.NET Pin
Christian Graus4-Aug-07 3:12
protectorChristian Graus4-Aug-07 3:12 
Questionhow to access one java scrpt in multiple forms Pin
biswa474-Aug-07 1:02
biswa474-Aug-07 1:02 
AnswerRe: how to access one java scrpt in multiple forms Pin
Christian Graus4-Aug-07 3:03
protectorChristian Graus4-Aug-07 3:03 
AnswerRe: how to access one java scrpt in multiple forms Pin
Eliz.k4-Aug-07 4:43
Eliz.k4-Aug-07 4:43 
QuestionIntegration of blogs with asp.net 2.0 Pin
SameerTaha4-Aug-07 0:58
SameerTaha4-Aug-07 0:58 
AnswerRe: Integration of blogs with asp.net 2.0 Pin
Christian Graus4-Aug-07 3:13
protectorChristian Graus4-Aug-07 3:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.