H
hplayer03
I am trying to create an asp.net 2.0 site that has the paths of images
stored in a sql database. I am able to connect to the database and
extract the paths. I am stuck now because i would like to dynamically
create images and set their paths to those that i find in the
database....here is the code to get the path names:
string connSTR =
ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString.ToString();
SqlConnection conn = new SqlConnection(connSTR);
SqlDataAdapter a = new SqlDataAdapter("SELECT path, name,
description FROM Pics;", conn);
DataSet s = new DataSet();
a.Fill(s);
string sImagePath = "";
foreach (DataRow dr in s.Tables[0].Rows)
{
sImagePath = dr[0].ToString() + dr[1].ToString();
}
stored in a sql database. I am able to connect to the database and
extract the paths. I am stuck now because i would like to dynamically
create images and set their paths to those that i find in the
database....here is the code to get the path names:
string connSTR =
ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString.ToString();
SqlConnection conn = new SqlConnection(connSTR);
SqlDataAdapter a = new SqlDataAdapter("SELECT path, name,
description FROM Pics;", conn);
DataSet s = new DataSet();
a.Fill(s);
string sImagePath = "";
foreach (DataRow dr in s.Tables[0].Rows)
{
sImagePath = dr[0].ToString() + dr[1].ToString();
}