in database table is thier . in that table fields are
photoid , photoname,photo... i want display image in the
gridview
Answer Posted / .....
initially while inserting image into database take the
database field in oracle as BLOB in sql as image
during insertion convert the image file into bytes and
insert it into the database
during the display of image in datagrid take a image
template and display the converted values
sample code to get the image:
public byte[] spic(string cm,int id)
{
con = new OracleConnection(cm);
OracleCommand cmd = new OracleCommand("select
photo from kir_image where eid= "+id +" ", con);
con.Open();
byte[] img = (byte[])cmd.ExecuteScalar();
con.Close();
return img;
}
use Response.BinaryWrite to display the image
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the difference between cookie and session?
What are the event handlers that can be included in the Global.asax file?
What is the use of dispose method?
What are the built-in objects in asp.net?
What is the application pool?
How to Separate background image and front image from original picture....
How long does an http session last?
Differentiate between namespace and assembly.
How long the items in ViewState exists?
How can you handle errors in Web API?
Whats the difference between registerclientscriptblock, registerclientscriptinclude and registerclientscriptresource?
How you will improve web application performance?
Explain the use of resource manager class in .net.
What is %20 in a url?
What is bson in web api?