Thanx Mark
Can u tell me about any other control build using the inheritance from
the orignal addrotator class?
I have one but that does not work well code for that Control is as
follows:
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Text
Imports System.Web
<DefaultProperty("Text"), ToolboxData("<{0}:CAdRotator runat=" &
"""server""" & "></{0}:CAdRotator>")> Public Class CAdRotator
Inherits System.Web.UI.WebControls.AdRotator
Private blnSWF As Boolean
Private strImgUrl As String
Private strNavUrl As String
Protected Overrides Sub Render(ByVal writer As
System.Web.UI.HtmlTextWriter)
If Me.blnSWF Then
Dim StringFormat As StringBuilder = New
StringBuilder("<object
classid=""clsid
27CDB6E-AE6D-11cf-96B8-444553540000"" ")
StringFormat.Append("codebase=""
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0""
width={0} height={1}>")
StringFormat.Append("classid=""clsid
27CDB6E-AE6D-11CF-96B8-444553540000""")
StringFormat.Append("<param name=""_cx"" value=""2646""
/>")
StringFormat.Append("<param name=""_cy"" value=""2646""
/>")
StringFormat.Append("<param name=""FlashVars"" value=""""
/>")
StringFormat.Append(" <param name=""movie"" value={2}>")
StringFormat.Append(" <param name=""Src"" value={2}>")
StringFormat.Append(" <param name=""WMode""
value=""Window"">")
StringFormat.Append(" <param name=""Play"" value=""-1"">")
StringFormat.Append(" <param name=""Loop"" value=""-1"">")
StringFormat.Append(" <param name=""Quality""
value=""High"">")
StringFormat.Append(" <param name=""SAlign""
value=""LT"">")
StringFormat.Append(" <param name=""Menu"" value=""-1"">")
StringFormat.Append(" <param name=""Base"" value="""">")
StringFormat.Append(" <param name=""AllowScriptAccess""
value=""always"">")
StringFormat.Append(" <param name=""Scale""
value=""ExactFit"">")
StringFormat.Append(" <param name=""DeviceFont""
value=""0"">")
StringFormat.Append(" <param name=""EmbedMovie""
value=""0"">")
StringFormat.Append(" <param name=""BGColor""
value="""">")
StringFormat.Append(" <param name=""SWRemote""
value="""">")
StringFormat.Append(" <param name=""MovieData""
value="""">")
StringFormat.Append(" <param name=""SeamlessTabbing""
value=""1"">")
StringFormat.Append(" <param name=""Profile""
value=""0"">")
StringFormat.Append(" <param name=""ProfileAddress""
value="""">")
StringFormat.Append(" <param name=""ProfilePort""
value=""0"">")
StringFormat.Append(" <param name=""AllowNetworking""
value=""all"">")
StringFormat.Append(" </object>")
Dim OutPutString As StringBuilder = New StringBuilder()
OutPutString.AppendFormat(StringFormat.ToString, 468, 60,
Me.ImageUrlField, Me.ImageUrlField)
writer.Write(OutPutString.ToString)
Else
MyBase.Render(writer)
End If
End Sub
Protected Overrides Sub OnAdCreated(ByVal e As AdCreatedEventArgs)
MyBase.OnAdCreated(e)
If e.ImageUrl.ToLower().IndexOf(".swf") <> -1 Then
Me.blnSWF = True
Me.strImgUrl = e.ImageUrl
Me.strNavUrl = e.NavigateUrl
Else
Me.blnSWF = False
End If
End Sub
End Class
Kindly adjust it or just tell me about any orher link.