Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
ImageHandler
Kuldeep Katiyar
Feb 28 2016 2:31 PM
400
Reply
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
System.Data.DataSet dr = user.RetriveImage();
if (dr.Tables[0].Rows.Count > 0)
{
context.Response.ContentType = dr.Tables[0].Rows[0]["img"].ToString();
context.Response.BinaryWrite((byte[])dr.Tables[0].Rows[0]["img"]);
}
}
hi sir,
I have written this code to retrive image from database
in database image datatype is image and value we are saving into bytes
immidate after saving we are retrieving that image but its not displaying.
please help is any thing we have to add in web configue file i m adding but getting error
something has been added to httphandlers
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
how to append excel sheet using asp.net c# ?
insert data from asp page to ms word file based on 10 pages