Hi Telerik Team,
Do you have any examples you can provide where a "Radlive" Tile is used in a visual webpart for SharePoint 2010.
I tried the using the demo examples that were provided in the links below but that does not work for me . The radlive tile does not get populated.
http://demos.telerik.com/aspnet-ajax/tilelist/examples/livetiles/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/tilelist-tiles-livetile-loading-data.html
http://blogs.msmvps.com/windsor/2011/11/04/walkthrough-creating-a-custom-asp-net-asmx-web-service-in-sharepoint-2010/
I have tried both page methods and webservices. Neither has worked for me. Any help at this point would be greatly appreciated.
Here is the markup and server side code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TileMe.aspx.vb" Inherits="Starter.TileMe" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//The dataLoadingError client side event
occurs after the data request returns an error.
function
tileDataLoadingError(sender, args) {
var data =
args.set_cancelErrorAlert(true);
}
//The dataLoaded client side event occurs
after the data request returns the data successfully.
function
tileDataLoaded(sender, args) {
var data =
args.get_data();
//format the received date property
}
//The templateDataBound client-side event
occurs after the client template is data bound.
function
tileClientTemplateDataBound(sender, args) {
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="rsmTileMe" runat="server" EnablePageMethods="true" />
<telerik:RadLiveTile ID="rltTileMe" runat="server" UpdateInterval="6000" Value="TILEME" Shape="Wide" />
</div>
</form>
</body>
</html>
Imports Telerik.Web.UI
Imports System.Runtime.Serialization
'Imports
System.ServiceModel
Public Class TileMe
Inherits
System.Web.UI.Page
<DataContract> _
Public Class TileMeSilly
<DataMember>
_
Public ReadOnly Property CurrentDateTime As String
Get
Return
Now.ToString
End Get
End Property
<DataMember>
_
Public ReadOnly Property TomorrowDateTime As String
Get
Return
Now.AddDays(1).ToString
End Get
End Property
End Class
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
InitTileMe(rltTileMe)
End Sub
Protected Sub InitTileMe(ByVal tile As RadLiveTile)
tile.Target = "_blank"
tile.ClientTemplate = "<div
class=""tileClientTemplate"">" & _
"<div><strong>Current:</strong>
#= CurrentDateTime #</div>" & _
"<div><strong>Tomorrow:</strong>
#= TomorrowDateTime #</div>" & _
"</div>"
tile.WebServiceSettings.Path = "TileMe.aspx"
tile.WebServiceSettings.Method = "TileMeMeth"
tile.OnClientDataLoaded = "tileDataLoaded"
tile.OnClientDataLoadingError = "tileDataLoadingError"
tile.OnClientTemplateDataBound = "tileClientTemplateDataBound"
End Sub
<System.Web.Services.WebMethod()> _
Public Shared Function TileMeMeth() As TileMeSilly
Return New TileMeSilly
End Function
End Class
Do you have any examples you can provide where a "Radlive" Tile is used in a visual webpart for SharePoint 2010.
I tried the using the demo examples that were provided in the links below but that does not work for me . The radlive tile does not get populated.
http://demos.telerik.com/aspnet-ajax/tilelist/examples/livetiles/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/tilelist-tiles-livetile-loading-data.html
http://blogs.msmvps.com/windsor/2011/11/04/walkthrough-creating-a-custom-asp-net-asmx-web-service-in-sharepoint-2010/
I have tried both page methods and webservices. Neither has worked for me. Any help at this point would be greatly appreciated.
Here is the markup and server side code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TileMe.aspx.vb" Inherits="Starter.TileMe" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//The dataLoadingError client side event
occurs after the data request returns an error.
function
tileDataLoadingError(sender, args) {
var data =
args.set_cancelErrorAlert(true);
}
//The dataLoaded client side event occurs
after the data request returns the data successfully.
function
tileDataLoaded(sender, args) {
var data =
args.get_data();
//format the received date property
}
//The templateDataBound client-side event
occurs after the client template is data bound.
function
tileClientTemplateDataBound(sender, args) {
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="rsmTileMe" runat="server" EnablePageMethods="true" />
<telerik:RadLiveTile ID="rltTileMe" runat="server" UpdateInterval="6000" Value="TILEME" Shape="Wide" />
</div>
</form>
</body>
</html>
Imports Telerik.Web.UI
Imports System.Runtime.Serialization
'Imports
System.ServiceModel
Public Class TileMe
Inherits
System.Web.UI.Page
<DataContract> _
Public Class TileMeSilly
<DataMember>
_
Public ReadOnly Property CurrentDateTime As String
Get
Return
Now.ToString
End Get
End Property
<DataMember>
_
Public ReadOnly Property TomorrowDateTime As String
Get
Return
Now.AddDays(1).ToString
End Get
End Property
End Class
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
InitTileMe(rltTileMe)
End Sub
Protected Sub InitTileMe(ByVal tile As RadLiveTile)
tile.Target = "_blank"
tile.ClientTemplate = "<div
class=""tileClientTemplate"">" & _
"<div><strong>Current:</strong>
#= CurrentDateTime #</div>" & _
"<div><strong>Tomorrow:</strong>
#= TomorrowDateTime #</div>" & _
"</div>"
tile.WebServiceSettings.Path = "TileMe.aspx"
tile.WebServiceSettings.Method = "TileMeMeth"
tile.OnClientDataLoaded = "tileDataLoaded"
tile.OnClientDataLoadingError = "tileDataLoadingError"
tile.OnClientTemplateDataBound = "tileClientTemplateDataBound"
End Sub
<System.Web.Services.WebMethod()> _
Public Shared Function TileMeMeth() As TileMeSilly
Return New TileMeSilly
End Function
End Class