Hi!
While I was converting some regular ASP code to use the Telerik controls, I found a problem with some of our pages. We have a header user control with a logout button, so I want to convert the button to be a Rad Image Button. When I add in a RadButton (or Rad anything) to the header, I get an error that says āThe Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)ā for some of the pages. I found that it seems to be unhappy with the <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> line, or anything that tries to add Telerik controls to the user control. Does anyone have any idea what could be causing this and how to fix it? Iād really like to be able to the Telerik image buttons throughout all of our code. Thanks!
Holly
<telerik:RadNotification ID="RadNotification1" runat="server" Width="320" Animation="Fade" EnableRoundedCorners="true" Skin="Windows7" EnableShadow="true" Style="z-index: 35000" LoadContentOn="TimeInterval" OffsetX="-20" OffsetY="-20" VisibleTitlebar="true" WcfRequestMethod="POST" WcfServicePath="~/Service References/ProcessLogServiceRef/Reference.svcmap" WcfServiceMethod="GetLogData" UpdateInterval="5000" OnClientUpdating="RadNotificationUpdating"></telerik:RadNotification><telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function RadNotificationUpdating(sender, args) { //alert('Hallo'); } </script></telerik:RadScriptBlock>using System;using System.Collections.Generic;using System.Linq;using System.Runtime.Serialization;using System.ServiceModel;using System.Text;using System.ServiceModel.Activation;namespace YBS.Services.SYS{ // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ProcessLog" in both code and config file together. [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class ProcessLog : IProcessLog { public void GetLogData(string sTimeStamp) { } }}<script type="text/javascript"> function doTweet(sender, args) { alert("hey! " + args.get_url()); }</script>[...]<telerik:RadSocialShare ID="RadSocialShare1" OnTweet="doTweet" runat="server"></telerik:RadSocialShare>RadSocialShare1.MainButtons.Clear();RadSocialShare1.CompactButtons.Clear();[...]RadTwitterButton rsbTW = new RadTwitterButton();rsbTW.TitleToShare = strTitleToShare;rsbTW.UrlToShare = strUrlTW; //BitlyApi.ShortenUrl(RadSocialShare1.MainButtons.Add(rsbTW);
