I have a multitude of problems, but I will start with the most important.
1) I have a rotator that shows images that have descriptions. On mouseover tooltip is suppose to load the description. On every site expect the root of the site, this works. On the root, it appears that the value being passed to the user control is getting lost in translation; for example, the value might be 18 but its passing 91. I have copied the code sections exactly from the children sites and it still has problems. Please help!!
Again, this is proven code that works on all sites expect the root. Any ideas will be greatly appreciated.
UPDATE : My latest guess is that it is a databinding problem from the datasource to the rotator. (12.3.10 10:30 CST)
1) I have a rotator that shows images that have descriptions. On mouseover tooltip is suppose to load the description. On every site expect the root of the site, this works. On the root, it appears that the value being passed to the user control is getting lost in translation; for example, the value might be 18 but its passing 91. I have copied the code sections exactly from the children sites and it still has problems. Please help!!
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
this.UpdateToolTip(args.Value, args.UpdatePanel);
}
private void UpdateToolTip(string elementID, UpdatePanel panel)
{
Control ctrl = Page.LoadControl("ImageDesc.ascx");
panel.ContentTemplateContainer.Controls.Add(ctrl);
ImageDesc img = (ImageDesc)ctrl;
img.IDNum = elementID;
}
protected void RadRotator1_ItemDataBound(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
{
Control target = e.Item.FindControl("RadBinaryImage1");
HiddenField id = (HiddenField)e.Item.FindControl("HiddenField2");
HiddenField id2 = (HiddenField)e.Item.FindControl("HiddenField1");
if (!Object.Equals(target, null))
{
if (!Object.Equals(this.RadToolTipManager1, null))
{
//Add the button (target) id to the tooltip manager
this.RadToolTipManager1.TargetControls.Add(target.ClientID, id2.Value+id.Value, true);
}
}
}
<
div
class
=
"pics"
>
<
telerik:RadRotator
ID
=
"RadRotator1"
Enabled
=
"false"
runat
=
"server"
ItemWidth
=
"207"
Height
=
"122"
ItemHeight
=
"122"
DataSourceID
=
"SqlDataSource1"
Skin
=
"Office2007"
OnItemDataBound
=
"RadRotator1_ItemDataBound"
Width
=
"620px"
BorderColor
=
"#FF3300"
FrameDuration
=
"7000"
>
<
ItemTemplate
>
<
telerik:RadBinaryImage
ID
=
"RadBinaryImage1"
DataValue='<%# Eval("Image") %>' runat="server" />
<
asp:HiddenField
ID
=
"HiddenField1"
runat
=
"server"
Value='<%# Eval("ImageID") %>' />
<
asp:HiddenField
ID
=
"HiddenField2"
runat
=
"server"
Value='<%# Eval("ImageDesc") %>' />
</
ItemTemplate
>
</
telerik:RadRotator
>
<
telerik:RadToolTipManager
ID
=
"RadToolTipManager1"
OffsetY
=
"-1"
HideEvent
=
"Default"
runat
=
"server"
OnAjaxUpdate
=
"OnAjaxUpdate"
RelativeTo
=
"Element"
Skin
=
"Office2007"
Position
=
"BottomCenter"
>
</
telerik:RadToolTipManager
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:RootConnection %>"
SelectCommand="Select Top 15 Image,ImageID,ImageDesc + 'ID:'+convert(varchar(10),ImageID) as 'ImageDesc' From CMS_Header_Images Where Archive='No' and SiteID=@SiteID ORDER BY NEWID()">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"RotatorSiteID"
Name
=
"SiteID"
PropertyName
=
"Value"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
asp:HiddenField
ID
=
"RotatorSiteID"
runat
=
"server"
/>
</
div
>
Again, this is proven code that works on all sites expect the root. Any ideas will be greatly appreciated.
UPDATE : My latest guess is that it is a databinding problem from the datasource to the rotator. (12.3.10 10:30 CST)