Hi @Diksha dudi ,
Can you describe your needs in more detail? What does each data in the database mean?
I guess you might want to use AdRotator with a database, you can refer to the code below.
<asp:AdRotator id="AdRotator1" runat="server"/>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Using con As SqlConnection = New SqlConnection("****")
Using cmd As SqlCommand = New SqlCommand("SELECT * FROM mainindex_img", con)
Dim sda As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dt As DataTable = New DataTable()
sda.Fill(dt)
AdRotator1.DataSource = dt
AdRotator1.DataBind()
End Using
End Using
End Sub
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.