Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Adrotator control.. programming

Reply
Thread Tools

Adrotator control.. programming

 
 
Aussie Rules
Guest
Posts: n/a
 
      06-04-2007
Hi,
I have a adrotator control on a page, and want to program the connection of
the control via SQL.

I have the following code, but not sure what else to do?


Dim SQLServerConnection As SqlConnection
Dim SqlConnectionCls As New clsSQL
SQLServerConnection = SqlConnectionCls.Connect

Dim SqlCommand As New SqlCommand

With SqlCommand
.CommandType = Data.CommandType.StoredProcedure
.Connection = SQLServerConnection
.CommandTimeout = 15
.CommandText = "sproc_GetAddDetails"
End With

Me.AdRotator1.DataSource = SqlCommand

AdRotator1.ImageUrlField = "advert_image"
AdRotator1.NavigateUrlField = "advert_URLlink"




 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      06-05-2007
Hi Aussie,

Regarding on this issue, I have also seen your another one in the following
newsgroup:

Subject: Adrotator
Newsgroups: microsoft.public.dotnet.framework.aspnet

Community member Alexey and I have posted some suggestion there. Please
have a look and feel free to followup in that thread if you have any
further questions.

Thanks for your posting!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
 
Aussie Rules
Guest
Posts: n/a
 
      06-05-2007
Hi Steven,

Thanks for your reply.

I am still not able to get this to work. My code is as follows. When I view
source of the HTML page, there are no values for the adrotator at all.
The Stored Proc works fine.


Try

Dim SQLServerConnection As SqlConnection
Dim SqlConnectionCls As New clsSQL
SQLServerConnection = SqlConnectionCls.Connect
Dim SqlCommand As New SqlCommand

With SqlCommand

.CommandType = Data.CommandType.StoredProcedure
.Connection = SQLServerConnection
.CommandTimeout = 15
.CommandText = "sproc_GetBannerAdvertDetails"

End With

' I have swapped these arround and tried, but not working. I have put the
image/navurl after the databind.

AdRotator1.ImageUrlField = "advert_image"
AdRotator1.NavigateUrlField = "advert_URLlink"
AdRotator1.DataSource = SqlCommand.ExecuteReader
AdRotator1.DataBind()

Catch ex As Exception


End Try




"Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Aussie,
>
> Regarding on this issue, I have also seen your another one in the
> following
> newsgroup:
>
> Subject: Adrotator
> Newsgroups: microsoft.public.dotnet.framework.aspnet
>
> Community member Alexey and I have posted some suggestion there. Please
> have a look and feel free to followup in that thread if you have any
> further questions.
>
> Thanks for your posting!
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adrotator and flash banner? DDK ASP .Net 1 10-25-2007 09:31 PM
AdRotator Miguel Dias Moura ASP .Net 1 10-14-2004 03:47 PM
Similar to adrotator, but to generate text? John Buchmann ASP .Net 3 09-25-2004 09:43 AM
how to use adrotator Britney ASP .Net 2 09-08-2004 08:15 PM
AdRotator C Downey ASP .Net 1 06-17-2004 06:26 AM



Advertisments