Click here to Skip to main content
16,011,626 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: finding the index of datagrid using the selected item templates Pin
A.Vishal1-Aug-07 16:06
A.Vishal1-Aug-07 16:06 
QuestionWhy the exception "Object reference not set to an instance of an object." occurs? Pin
hurrem30-Jul-07 14:41
hurrem30-Jul-07 14:41 
AnswerRe: Why the exception "Object reference not set to an instance of an object." occurs? Pin
Christian Graus30-Jul-07 17:49
protectorChristian Graus30-Jul-07 17:49 
AnswerRe: Why the exception "Object reference not set to an instance of an object." occurs? Pin
daniel__c30-Jul-07 20:34
daniel__c30-Jul-07 20:34 
QuestionWHATS THAT PROBLEMS Pin
Neo_Shehpar30-Jul-07 14:21
Neo_Shehpar30-Jul-07 14:21 
AnswerRe: WHATS THAT PROBLEMS Pin
Christian Graus30-Jul-07 17:48
protectorChristian Graus30-Jul-07 17:48 
GeneralRe: WHATS THAT PROBLEMS [modified] Pin
Neo_Shehpar3-Aug-07 3:17
Neo_Shehpar3-Aug-07 3:17 
QuestionSetting file ContentType dynamically [modified] Pin
ASPnoob30-Jul-07 13:09
ASPnoob30-Jul-07 13:09 
Hi, I've read that usually if one wants to display binary data from a data store one has to read it using the ExecuteScalar() method of the SqlCommand class. Then caste the object the method returns by putting it in a byte array and display it like the following.

 Response.ContentType = "application/pdf"<br />
<br />
    Response.BinaryWrite(buffer);


How do I set the Mime Type of the file retrieved from the database dynamically? What I have in mind is this, suppose I have 3 fields in my database table with their data stored like the following:
ResumeID Int        Resumes Blob         ResumeTypes   Varchar(50)
    1                Something              "application/doc"
    2                Another Something      "image/img"

I then get the value of the ResumeTypes field of my database and place it in the code like this
Response.ContentType = "Value of ResumeTypes"

How do I go about doing that? Thank you in advance for your help.







-- modified at 21:28 Monday 30th July, 2007
AnswerRe: Setting file ContentType dynamically Pin
Christian Graus30-Jul-07 17:50
protectorChristian Graus30-Jul-07 17:50 
GeneralRe: Setting file ContentType dynamically [modified] Pin
ASPnoob30-Jul-07 19:18
ASPnoob30-Jul-07 19:18 
GeneralRe: Setting file ContentType dynamically Pin
Christian Graus30-Jul-07 19:27
protectorChristian Graus30-Jul-07 19:27 
Questionupdate panel problem Pin
Mogaambo30-Jul-07 12:07
Mogaambo30-Jul-07 12:07 
QuestionASP.NET Button postback issue [modified] Pin
stoland - work30-Jul-07 9:57
stoland - work30-Jul-07 9:57 
AnswerRe: ASP.NET Button postback issue Pin
Christian Graus30-Jul-07 11:13
protectorChristian Graus30-Jul-07 11:13 
QuestionTable Question Pin
nlindley730-Jul-07 8:54
nlindley730-Jul-07 8:54 
AnswerRe: Table Question Pin
rashadaliarshad30-Jul-07 9:05
rashadaliarshad30-Jul-07 9:05 
GeneralRe: Table Question Pin
nlindley730-Jul-07 9:21
nlindley730-Jul-07 9:21 
GeneralRe: Table Question Pin
rashadaliarshad30-Jul-07 9:30
rashadaliarshad30-Jul-07 9:30 
GeneralRe: Table Question Pin
nlindley730-Jul-07 9:41
nlindley730-Jul-07 9:41 
AnswerRe: Table Question Pin
ToddHileHoffer30-Jul-07 9:06
ToddHileHoffer30-Jul-07 9:06 
GeneralRe: Table Question Pin
nlindley730-Jul-07 9:19
nlindley730-Jul-07 9:19 
QuestionGetting object declared in HTML Component Pin
satindra200230-Jul-07 7:31
satindra200230-Jul-07 7:31 
AnswerRe: Getting object declared in HTML Component Pin
ToddHileHoffer30-Jul-07 9:07
ToddHileHoffer30-Jul-07 9:07 
GeneralRe: Getting object declared in HTML Component Pin
satindra200230-Jul-07 19:00
satindra200230-Jul-07 19:00 
QuestionWeb.Config File Problem...Please Help Pin
rashadaliarshad30-Jul-07 7:27
rashadaliarshad30-Jul-07 7:27 

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.