S
shapper
Hello,
I need to place Javascript code inside an Aspanel so that the Google
Adsense banner be placed inside the panel.
I know how to do something like this in a page:
' Add javascript file (Show_Ads.js) [Google AdSense]
If Not Page.ClientScript.IsClientScriptIncludeRegistered("AdSense")
Then
Page.ClientScript.RegisterClientScriptInclude(Me.GetType(),
"AdSense", "http://pagead2.googlesyndication.com/pagead/show_ads.js")
End If
' Add javascript code (AdSense Code) [Google AdSense]
Dim urchinTracker As String = "<script
type=""text/javascript""><!-- " & _
"google_ad_client = ""xxx"";" & _
"google_ad_width = 250;" & _
"google_ad_height = 250;" & _
"google_ad_format = ""250x250_as"";"
& _
"google_ad_type = ""image"";" & _
"google_ad_channel ="""";" & _
"//--></script>"
If (Not
Page.ClientScript.IsClientScriptBlockRegistered("AdSenseCode")) Then
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(),
"AdSenseCode", urchinTracker)
End If
However I have no idea of how to place the javascript code inside the
Aspanel so that the banner appear there.
I need to make this at runtime.
Could somebody help me out with this?
Thanks,
Miguel
I need to place Javascript code inside an Aspanel so that the Google
Adsense banner be placed inside the panel.
I know how to do something like this in a page:
' Add javascript file (Show_Ads.js) [Google AdSense]
If Not Page.ClientScript.IsClientScriptIncludeRegistered("AdSense")
Then
Page.ClientScript.RegisterClientScriptInclude(Me.GetType(),
"AdSense", "http://pagead2.googlesyndication.com/pagead/show_ads.js")
End If
' Add javascript code (AdSense Code) [Google AdSense]
Dim urchinTracker As String = "<script
type=""text/javascript""><!-- " & _
"google_ad_client = ""xxx"";" & _
"google_ad_width = 250;" & _
"google_ad_height = 250;" & _
"google_ad_format = ""250x250_as"";"
& _
"google_ad_type = ""image"";" & _
"google_ad_channel ="""";" & _
"//--></script>"
If (Not
Page.ClientScript.IsClientScriptBlockRegistered("AdSenseCode")) Then
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(),
"AdSenseCode", urchinTracker)
End If
However I have no idea of how to place the javascript code inside the
Aspanel so that the banner appear there.
I need to make this at runtime.
Could somebody help me out with this?
Thanks,
Miguel