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
Who can consume WebAPI?
Why we go for mvc instead of asp.net? : Asp.Net MVC
Explain the features that make asp.net more used framework? : asp.net mvc
What is active web pages?
How does session work in asp net?
How to prepare culture-specific formatting in .net.
What does aspcompat="true" mean?
What are the events that happen when a client requests an asp.net page from iis server?
What is the default timeout for a cookie?
Why asp.net is used?
Explain the components of web form in asp.net
What are the ways of preserving data on a Web Form in ASP.NET?
What parameters can you pass in the url of the api? Can get and post use the same url?
Explain managed code an un-managed code.
What is the difference between dynamic SGA and static SGA?