Click here to Skip to main content
15,888,454 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDisplaying the image from the Sql Pin
NaveenHS23-Jun-11 2:15
NaveenHS23-Jun-11 2:15 
AnswerRe: Displaying the image from the Sql Pin
Blue_Boy23-Jun-11 4:55
Blue_Boy23-Jun-11 4:55 
AnswerRe: Displaying the image from the Sql Pin
GenJerDan23-Jun-11 6:14
GenJerDan23-Jun-11 6:14 
GeneralRe: Displaying the image from the Sql Pin
Not Active23-Jun-11 7:38
mentorNot Active23-Jun-11 7:38 
GeneralRe: Displaying the image from the Sql Pin
GenJerDan23-Jun-11 7:49
GenJerDan23-Jun-11 7:49 
GeneralRe: Displaying the image from the Sql Pin
Not Active23-Jun-11 8:03
mentorNot Active23-Jun-11 8:03 
GeneralRe: Displaying the image from the Sql Pin
GenJerDan23-Jun-11 8:08
GenJerDan23-Jun-11 8:08 
AnswerRe: Displaying the image from the Sql Pin
RichardGrimmer28-Jun-11 5:05
RichardGrimmer28-Jun-11 5:05 
OK - what you're doing here is explicitly telling the browser that what's coming is an image in jpeg format (Response.ContentType), and that the content itself is the bytestream (Response.OutputStream.Write).

With those lines in place, you're NOT rendering anything else to the browser - just the image.

The default Response.ContentType is (IIRC) text/html - which is effectively a webpage, so with the lines commented, you're basically saying "do the normal thing", and not writing anything explicitly.

To render the image with the text, you need to set the Source of an Image control that's part of the page.

Something similar to the following...

byte[] imageData = (byte[])dr[5];
MemoryStream memStream = new MemoryStream(imageData);
image = Image.FromStream(memStream);


Which incidentally is pretty much ripped off wholesale from the top link in Google[^]
C# has already designed away most of the tedium of C++.

AnswerRe: Displaying the image from the Sql Pin
Morgs Morgan8-Jul-11 5:19
Morgs Morgan8-Jul-11 5:19 
QuestionStrongly typed ActionLink is not present in vs 2010.. Pin
siva45522-Jun-11 23:45
siva45522-Jun-11 23:45 
AnswerRe: Strongly typed ActionLink is not present in vs 2010.. Pin
Not Active23-Jun-11 2:15
mentorNot Active23-Jun-11 2:15 
QuestionHow to find application URL while using separate script file in asp.net ? Pin
zeego21-Jun-11 20:47
zeego21-Jun-11 20:47 
AnswerRe: How to find application URL while using separate script file in asp.net ? Pin
Vasudevan Deepak Kumar22-Jun-11 10:42
Vasudevan Deepak Kumar22-Jun-11 10:42 
AnswerRe: How to find application URL while using separate script file in asp.net ? Pin
Shahriar Iqbal Chowdhury/Galib22-Jun-11 11:04
professionalShahriar Iqbal Chowdhury/Galib22-Jun-11 11:04 
GeneralRe: How to find application URL while using separate script file in asp.net ? Pin
AspDotNetDev22-Jun-11 11:12
protectorAspDotNetDev22-Jun-11 11:12 
AnswerRe: How to find application URL while using separate script file in asp.net ? Pin
AspDotNetDev22-Jun-11 11:10
protectorAspDotNetDev22-Jun-11 11:10 
QuestionRemember sort order on paging for Datagrid Pin
vanikanc21-Jun-11 15:34
vanikanc21-Jun-11 15:34 
AnswerRe: Remember sort order on paging for Datagrid Pin
nainakarri21-Jun-11 20:30
nainakarri21-Jun-11 20:30 
QuestionHow to load the Iframe with hidden fields after the page load event Pin
Vimalsoft(Pty) Ltd21-Jun-11 8:24
professionalVimalsoft(Pty) Ltd21-Jun-11 8:24 
QuestionRedirect to UnAuthorized Page in Windows Authentication Pin
antony beula21-Jun-11 2:07
antony beula21-Jun-11 2:07 
AnswerRe: Redirect to UnAuthorized Page in Windows Authentication Pin
Not Active21-Jun-11 2:23
mentorNot Active21-Jun-11 2:23 
GeneralRe: Redirect to UnAuthorized Page in Windows Authentication Pin
antony beula21-Jun-11 2:40
antony beula21-Jun-11 2:40 
QuestionTextbox value doesn't change between postbacks Pin
benams21-Jun-11 1:20
benams21-Jun-11 1:20 
AnswerRe: Textbox value doesn't change between postbacks Pin
mcyogi21-Jun-11 1:37
mcyogi21-Jun-11 1:37 
AnswerRe: Textbox value doesn't change between postbacks Pin
Not Active21-Jun-11 2:26
mentorNot Active21-Jun-11 2:26 

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.