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
Why is asp.net so popular?
Where is the view state data stored?
What is synchronous and Asynchronous post back ?
What is ispostback method in asp.net? Why do we use that?
Explain parts of assembly?
What are the disadvantages of using session?
Why session is more secure than cookies?
What is asp.net mvc5? : Asp.Net MVC
What is virtual directory in asp.net?
What is the significance of ASP.NET routing?
What is the difference between Classic ASP and ASP.Net?
What is view state management in asp net?
What’s the difference between asp.net web forms and asp.net mvc?
How you can return View from ASP.NET Web API method?
How many types of triggers are there in update panel?