the database that i created only
imageName - varchar
imageUP - image type
can all the talent show me how to do, can show the the data type also (database)..
I USING VB2008, ASP.NET C#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gai Ben BenPosted Aug 15, 2009, 3:37 AM
First, i must thank you..
but i can't run it, because this error appear "The control with ID 'Timer1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it." .
is it like this??
private DataTable FetchAdsFromDB()
{
string sql = "select * from the database i 1 retrieve";
SqlDataAdapter da = new SqlDataAdapter(sql, db connection);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
no need create any database connection..
and what if my database contain many many pictures, and i 1 to let user to choose the picture that he already UpLoad??
Master BillaPosted Aug 15, 2009, 3:22 AM
Add adrotator in your html code and write code like this way with timer tick to display image in interval
just simple code snippet here
private DataTable GetImages()
{
string sql = "select * from YourAdRotatorTableName";
SqlDataAdapter da = new SqlDataAdapter(sql, con);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
protected void Timer1_Tick(object sender, EventArgs e)
{
AdRotator1.DataSource = GetImages();
AdRotator1.DataBind();
}
and more details here
http://www.aspdotnetcodes.com/Asp.Net_AdRotator_Database.aspx
thank you
Roei BarPosted Aug 15, 2009, 2:53 AM
and the addrotator Timer event
good luck, and if you like it, dont forget to"mark as accepted answer"