hi all,

i have image path name in database and i am fetching it this way.

con.Open();
string img= "select imgPath from Tbl_Image where imgId='1'";
SqlCommand cmd = new SqlCommand(img,con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();

i got path name in ds.

now my question is how to assign that path to my image.

//imgCurrent.ImageUrl= ?

help me.

Thanks you,
krunalkakadia

hi all i got my solution.

imgCurrent.ImageUrl = ds.Tables[0].Rows[0][0].ToString();

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.