Hi Experts,
I am using asp.net with C#.
I have a adrotator which I am binding through the database. I have following column in database table
- AdId
- AdTitle
- AlternateText
- ImageUrl
- NavigateUrl
- AdDescription
It is binding correctly and showing the data, now I want a label on the right of the adrotator which show the AdDescription, but it is showing the first record only. I'll try to explain you with the code
private void GetPopUpData()
{
string conn = "Data Source=KKR;Initial Catalog=XYZ;Integrated Security=True";
SqlConnection Scon = new SqlConnection(conn);
Scon.Open();
SqlDataAdapter da = new SqlDataAdapter("Select * FROM tblAd", Scon);
DataSet ds = new DataSet();
da.Fill(ds);
AdRotator1.DataSource = ds.Tables[0];
AdRotator1.DataBind();
lblDesc.Text = ds.Tables[0].Rows[0]["AdDescription"].ToString();
}
protected void timer1_Tick(object sender, EventArgs e)
{
GetPopUpData();
}
Please help me in displaying the text data on the right side of the adrotator, as it is only showing the data of the first record. might be because i have used Rows[0].
Thanks in advance