Click here to Skip to main content
15,925,061 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Adding reference Pin
John-ph23-Sep-07 22:58
John-ph23-Sep-07 22:58 
GeneralRe: Adding reference Pin
IamAmit23-Sep-07 23:26
IamAmit23-Sep-07 23:26 
GeneralRe: Adding reference Pin
John-ph23-Sep-07 23:41
John-ph23-Sep-07 23:41 
GeneralRe: Adding reference Pin
John-ph23-Sep-07 23:24
John-ph23-Sep-07 23:24 
GeneralRe: Adding reference Pin
IamAmit23-Sep-07 23:59
IamAmit23-Sep-07 23:59 
QuestionSearching DataView Pin
Shaurya_Rastogi23-Sep-07 20:40
Shaurya_Rastogi23-Sep-07 20:40 
QuestionInserting and Retrieving images from Oracle 9i to ASP.Net 2.0 Pin
Priya_200723-Sep-07 20:27
Priya_200723-Sep-07 20:27 
AnswerRe: Inserting and Retrieving images from Oracle 9i to ASP.Net 2.0 Pin
Tarun Dudhatra23-Sep-07 21:48
Tarun Dudhatra23-Sep-07 21:48 
Hi priya actuly I don't know it for oracle but i had done it in sql server ok. If u can convert then try to it into oracle. ok

I am explaining step by step.

1. just set datatype as a binary (or somewhat like which support binary data into oracle)of photo field in database.
2. Now convert your employees image into binary using below code.

//For Image storing into database after converting into binary.
// This code is writen in C#.NET.
byte[] binary = null;
if (FileUpload1.HasFile)
{
binary = new byte[FileUpload1.PostedFile.ContentLength];
binary = FileUpload1.FileBytes;
}
// Below line is command parameter it will used while u are inserting data using stored procedure
Cmd.Parameters.AddWithValue("@U_Photo", binary);//Photo

3. The above code will convert into binary and stored it into database.
4. Now retriving it back from database
//For retriving image from database and place into image control
//Below code is function named RetrievedImage()
// put this code into differnt page and set this page as a Image1.ImageUrl(thispage.aspx? pid='pid')
// and Image1 will place on your edit employee page. Ok


private System.Drawing.Image RetrieveImage(int pid)
{
System.Drawing.Image image = null;
try
{
strcon = System.Configuration.ConfigurationManager.AppSettings["ConnectionString"];
Con = new SqlConnection(strcon);

Con.Open();
Cmd = new SqlCommand("SELECT Photo_Field FROM table_Name where phot_Id='" + pid + "'", Con);
Cmd.CommandType = CommandType.Text;
SqlDataReader Dr = Cmd.ExecuteReader();

if (Dr.Read())
{
byte[] imageData = (byte[])Dr["U_Photo"];
MemoryStream memStream = new MemoryStream(imageData);
image = System.Drawing.Image.FromStream(memStream);
}
}
catch (Exception ex)
{
Session["Error"] = ex.Message.ToString();
}
return image;
}

I hope it will work fine. All the best.
QuestionAsp.net Textbox Events Pin
i gr823-Sep-07 20:00
i gr823-Sep-07 20:00 
AnswerRe: Asp.net Textbox Events Pin
Sandeep Akhare23-Sep-07 20:05
Sandeep Akhare23-Sep-07 20:05 
GeneralRe: Asp.net Textbox Events [modified] Pin
i gr823-Sep-07 20:14
i gr823-Sep-07 20:14 
GeneralRe: Asp.net Textbox Events Pin
John-ph23-Sep-07 21:03
John-ph23-Sep-07 21:03 
GeneralRe: Asp.net Textbox Events Pin
John-ph23-Sep-07 20:47
John-ph23-Sep-07 20:47 
GeneralRe: Asp.net Textbox Events Pin
Sandeep Akhare23-Sep-07 22:15
Sandeep Akhare23-Sep-07 22:15 
QuestionHow to send reminder Email through schedular SP in MSSQL 2000 Pin
Amit.Amit.Amit...23-Sep-07 19:46
Amit.Amit.Amit...23-Sep-07 19:46 
AnswerRe: How to send reminder Email through schedular SP in MSSQL 2000 Pin
John-ph23-Sep-07 20:37
John-ph23-Sep-07 20:37 
GeneralRe: How to send reminder Email through schedular SP in MSSQL 2000 Pin
Amit.Amit.Amit...23-Sep-07 22:36
Amit.Amit.Amit...23-Sep-07 22:36 
QuestionHtml ctrl / Server ctrl Pin
i gr823-Sep-07 19:42
i gr823-Sep-07 19:42 
AnswerRe: Html ctrl / Server ctrl Pin
Christian Graus23-Sep-07 19:52
protectorChristian Graus23-Sep-07 19:52 
GeneralRe: Html ctrl / Server ctrl Pin
i gr823-Sep-07 19:58
i gr823-Sep-07 19:58 
Questionenterprise libray 2.0. Pin
saravanan0523-Sep-07 19:30
saravanan0523-Sep-07 19:30 
AnswerRe: enterprise libray 2.0. Pin
Christian Graus23-Sep-07 19:48
protectorChristian Graus23-Sep-07 19:48 
GeneralRe: enterprise libray 2.0. Pin
saravanan0523-Sep-07 19:55
saravanan0523-Sep-07 19:55 
GeneralRe: enterprise libray 2.0. Pin
Christian Graus23-Sep-07 19:58
protectorChristian Graus23-Sep-07 19:58 
GeneralRe: enterprise libray 2.0. Pin
saravanan0523-Sep-07 20:15
saravanan0523-Sep-07 20:15 

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.