Click here to Skip to main content
15,904,346 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Retrieve image from Sql Pin
Mark Churchill8-Feb-08 23:58
Mark Churchill8-Feb-08 23:58 
Take a step back and think about how HTML works.

The browser gets the page from the server. The IMG tag in the page points to where the image data is located. The browser makes a seperate request to get the image.

You will need to implement another page (better still an ashx handler), which can write that byte[] out, and set the Response.ContentType to image/jpeg (whatever).

Also please have a google for "SQL Injection" and "Parameterized Queries", because as your code stands now, I can delete anything out your database by typing nasty things into TextBox1...


GeneralRe: Retrieve image from Sql Pin
VanithaVasu10-Feb-08 19:27
VanithaVasu10-Feb-08 19:27 
Questionhow to encrypt the database connection string in web.config file Pin
jagan1238-Feb-08 23:42
jagan1238-Feb-08 23:42 
AnswerRe: how to encrypt the database connection string in web.config file Pin
Sun Rays9-Feb-08 0:22
Sun Rays9-Feb-08 0:22 
GeneralRe: how to encrypt the database connection string in web.config file Pin
jagan1239-Feb-08 0:37
jagan1239-Feb-08 0:37 
GeneralRe: how to encrypt the database connection string in web.config file Pin
Sun Rays9-Feb-08 1:00
Sun Rays9-Feb-08 1:00 
GeneralRe: how to encrypt the database connection string in web.config file Pin
jagan1239-Feb-08 1:19
jagan1239-Feb-08 1:19 
GeneralProblem in the code Pin
sjs4u8-Feb-08 22:55
sjs4u8-Feb-08 22:55 
GeneralGrid View Selected Index Pin
.NET- India 8-Feb-08 22:35
.NET- India 8-Feb-08 22:35 
GeneralRe: Grid View Selected Index Pin
Gandalf_TheWhite8-Feb-08 23:38
professionalGandalf_TheWhite8-Feb-08 23:38 
GeneralRe: Grid View Selected Index Pin
amargujrathi20069-Feb-08 7:33
amargujrathi20069-Feb-08 7:33 
QuestionI have not a option for CreateTextFormatOptions of ExportOptions. [modified] Pin
Member 39900128-Feb-08 20:57
Member 39900128-Feb-08 20:57 
GeneralWrong forum Pin
pmarfleet8-Feb-08 21:53
pmarfleet8-Feb-08 21:53 
QuestionFolder Browser(Interesting one) Pin
rain raj8-Feb-08 20:53
rain raj8-Feb-08 20:53 
GeneralRe: Folder Browser(Interesting one) Pin
pmarfleet8-Feb-08 21:52
pmarfleet8-Feb-08 21:52 
GeneralRe: Folder Browser(Interesting one) Pin
rain raj8-Feb-08 22:22
rain raj8-Feb-08 22:22 
GeneralRe: Folder Browser(Interesting one) Pin
pmarfleet8-Feb-08 23:26
pmarfleet8-Feb-08 23:26 
GeneralRe: Folder Browser(Interesting one) Pin
rain raj8-Feb-08 23:30
rain raj8-Feb-08 23:30 
GeneralRe: Folder Browser(Interesting one) Pin
amargujrathi20069-Feb-08 7:39
amargujrathi20069-Feb-08 7:39 
QuestionHow to delete a file without it getting stored in recycle bin folder . Pin
ritu43218-Feb-08 20:25
ritu43218-Feb-08 20:25 
AnswerRe: How to delete a file without it getting stored in recycle bin folder . Pin
Abhijit Jana8-Feb-08 21:45
professionalAbhijit Jana8-Feb-08 21:45 
GeneralRe: How to delete a file without it getting stored in recycle bin folder . Pin
ritu43218-Feb-08 22:45
ritu43218-Feb-08 22:45 
AnswerRe: How to delete a file without it getting stored in recycle bin folder . Pin
pmarfleet8-Feb-08 21:46
pmarfleet8-Feb-08 21:46 
GeneralRe: How to delete a file without it getting stored in recycle bin folder . Pin
ritu43218-Feb-08 22:47
ritu43218-Feb-08 22:47 
AnswerRe: How to delete a file without it getting stored in recycle bin folder . Pin
Gandalf_TheWhite8-Feb-08 22:42
professionalGandalf_TheWhite8-Feb-08 22:42 

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.