filupload didnot show my path picture

Posted by Sepede123 under ASP.NET on 9/9/2011 | Points: 10 | Views : 1197 | Status : [Member] | Replies : 3
hi i have image column in database(taht keep the path of picture in hard disk) and one fileupload in asp.net i want to know how can i bind fileupload to database that when i click on edit button of gridview ,fileupload show me automatically the path of picture taht i save in database




Responses

Posted by: Vuyiswamb on: 9/9/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
i think its the second time i send you this answer. i previously said , in the table that has the Image Path, should have a Primary key that you can bind to the gridview and get hidden, and when someone clicks the edit them , you get the path and and Primary key of that row and you do what you want with it.

Thank you for posting at Dotnetfunda
[Administrator]

Sepede123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sepede123 on: 9/10/2011 [Member] Starter | Points: 25

Up
0
Down
ok it's all!
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

A name was started with an invalid character. Error processing resource 'http://localhost/a/dastan.aspx'. Line 1, Position...

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="dastan.aspx.cs" Inherits="da...



Sepede123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sepede123 on: 9/10/2011 [Member] Starter | Points: 25

Up
0
Down
ok
it 's second time but i didn't achieve my answer ,my fileupload is out of gridview and is in form and i connect gridview to database whithout sqldatasource object
i connect it manuallyand i want codes that fileupload show the path of mage that saved in database i write this code but it didn't work!
//con.Open();
//DataSet s1 = new DataSet();
//int i = Convert.ToInt32(lblidbook.Text);
//string str = "select image from book where id_book='" + i + "'";
//SqlDataAdapter da1 = new SqlDataAdapter(str, con);
//da1.Fill(s1);
//FileUpload1.PostedFile.InputStream.Read();
//FileUpload1.DataBind();

Sepede123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response