| Webpage error details | |
| User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDR; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) | |
| Timestamp: Wed, 16 Sep 2009 21:39:37 UTC | |
| Message: 'undefined' is null or not an object | |
| Line: 5033 | |
| Char: 2 | |
| Code: 0 | |
| URI: http://as-qa-vm/AIMSNET/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scriptManager_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2009.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ad2d891f5-3533-469c-b9a2-ac7d16eb23ff%3a874f8ea2%3a24ee1bba%3a19620875%3a33108d14%3abd8f85e4%3ae330518b%3a1e771326%3ac8618e41%3a854aa0a7%3a5a6d9d23 | |
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadAjaxPanelDoesNotWork.aspx.cs" Inherits="WebUI.RadAjaxPanelDoesNotWork" %> | |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" > | |
| <head runat="server"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> | |
| </telerik:RadScriptManager> | |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> | |
| <AjaxSettings> | |
| <telerik:AjaxSetting AjaxControlID="Column1"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="Column1" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column2" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column3" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| <telerik:AjaxSetting AjaxControlID="Column2"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="Column1" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column2" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column3" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| <telerik:AjaxSetting AjaxControlID="Column3"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="Column1" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column2" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| <telerik:AjaxUpdatedControl ControlID="Column3" | |
| LoadingPanelID="RadAjaxLoadingPanel1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| </AjaxSettings> | |
| </telerik:RadAjaxManager> | |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" | |
| Skin="Default" MinDisplayTime="500"> | |
| </telerik:RadAjaxLoadingPanel> | |
| <asp:Button ID="btnAdd" OnClick="btnAdd_Click" runat="server" Text="Add Dock"/> | |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> | |
| <telerik:RadDockLayout runat="server" ID="radDockLayout" OnSaveDockLayout="radDockLayout_SaveDockLayout" OnLoadDockLayout="radDockLayout_LoadDockLayout"> | |
| <table style="width:99%;"> | |
| <tr> | |
| <td style="width: 30%;" valign="top" runat="server" Id="tblColumn1"> | |
| <telerik:RadDockZone runat="server" ID="Column1" Orientation="vertical" Style="border: 0px; width: 100%; min-height: 400px; min-width:100px"> | |
| </telerik:RadDockZone> | |
| </td> | |
| <td style="width: 30%;" valign="top" runat="server" Id="tblColumn2"> | |
| <telerik:RadDockZone runat="server" ID="Column2" Orientation="vertical" Style="border: 0px; width: 100%; min-height: 400px; min-width:100px"> | |
| </telerik:RadDockZone> | |
| </td> | |
| <td style="width: 30%;" valign="top" runat="server" Id="tblColumn3"> | |
| <telerik:RadDockZone runat="server" ID="Column3" Orientation="vertical" Style="border: 0px; width: 100%; min-height: 400px; min-width:100px;"> | |
| </telerik:RadDockZone> | |
| </td> | |
| </tr> | |
| </table> | |
| </telerik:RadDockLayout> | |
| </telerik:RadAjaxPanel> | |
| </form> | |
| </body> | |
| </html> | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| using System.Web.UI; | |
| using System.Web.UI.WebControls; | |
| using Telerik.Web.UI; | |
| namespace WebUI | |
| { | |
| public partial class RadAjaxPanelDoesNotWork : System.Web.UI.Page | |
| { | |
| private IList<DockState> dockStates = new List<DockState>(); | |
| private bool shouldSaveDocks = true; | |
| #region page events | |
| protected void Page_Init(object sender, EventArgs e) | |
| { | |
| LoadDocks(); | |
| } | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| if (!Page.IsPostBack) | |
| { | |
| shouldSaveDocks = false; | |
| } | |
| } | |
| protected void radDockLayout_LoadDockLayout(object sender, DockLayoutEventArgs e) | |
| { | |
| //Populate the event args with the state information. The RadDockLayout control | |
| //will automatically move the docks according that information. | |
| var savedDockStates = GetDockStates(); | |
| foreach (DockState dockState in savedDockStates) | |
| { | |
| e.Positions[dockState.UniqueName] = dockState.DockZoneID; | |
| e.Indices[dockState.UniqueName] = dockState.Index; | |
| } | |
| } | |
| protected void radDockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e) | |
| { | |
| //Save the dock state in the db. This will enable us | |
| // to recreate the dock in the next Page_Init. | |
| if (shouldSaveDocks) | |
| { | |
| List<DockState> dockStatesToSave = ((RadDockLayout)sender).GetRegisteredDocksState(); | |
| SaveDockStates(dockStatesToSave); | |
| } | |
| } | |
| protected void btnAdd_Click(object sender, EventArgs e) | |
| { | |
| RadDock dock = CreateRadDock(); | |
| Column1.Controls.Add(dock); | |
| CreateSaveStateTrigger(dock); | |
| dock.Title = "Sample User Control"; | |
| LoadWidget(dock); | |
| } | |
| #endregion | |
| #region Helper Methods | |
| private void LoadDocks() | |
| { | |
| dockStates = GetDockStates(); | |
| //Recreate the docks in order to ensure their proper operation | |
| foreach (DockState dockState in dockStates) | |
| { | |
| if (dockState.Closed == false) | |
| { | |
| RadDock dock = CreateRadDockFromState(dockState); | |
| //We will just add the RadDock control to the RadDockLayout. | |
| // You could use any other control for that purpose, just ensure | |
| // that it is inside the RadDockLayout control. | |
| // The RadDockLayout control will automatically move the RadDock | |
| // controls to their corresponding zone in the LoadDockLayout | |
| // event (see below). | |
| radDockLayout.Controls.Add(dock); | |
| //We want to save the dock state every time a dock is moved. | |
| CreateSaveStateTrigger(dock); | |
| LoadWidget(dock); | |
| } | |
| } | |
| } | |
| private IList<DockState> GetDockStates() | |
| { | |
| List<DockState> _currentDockStates = (List<DockState>)Session["DockStates"]; | |
| if (Object.Equals(_currentDockStates, null)) | |
| { | |
| _currentDockStates = new List<DockState>(); | |
| Session["DockStates"] = _currentDockStates; | |
| } | |
| return _currentDockStates; | |
| } | |
| private void SaveDockStates(IEnumerable<DockState> dockStatesToSave) | |
| { | |
| Session["DockStates"] = dockStatesToSave; | |
| } | |
| private static RadDock CreateRadDockFromState(DockState state) | |
| { | |
| var dock = new RadDock { DockModeDockMode = DockMode.Docked, EnableAnimation = true, Skin = "Default", ID = string.Format("RadDock{0}", state.UniqueName) }; | |
| dock.ApplyState(state); | |
| //dock.EnableAnimation = false; | |
| dock.Commands.Add(new DockCloseCommand()); | |
| dock.Commands.Add(new DockExpandCollapseCommand()); | |
| return dock; | |
| } | |
| private static RadDock CreateRadDock() | |
| { | |
| var dock = new RadDock { DockModeDockMode = DockMode.Docked, EnableAnimation = true, Skin = "Default", UniqueName = Guid.NewGuid().ToString() }; | |
| dock.ID = string.Format("RadDock{0}", dock.UniqueName); | |
| //dock.EnableAnimation = false; | |
| dock.Commands.Add(new DockCloseCommand()); | |
| dock.Commands.Add(new DockExpandCollapseCommand()); | |
| return dock; | |
| } | |
| private void CreateSaveStateTrigger(RadDock dock) | |
| { | |
| //Ensure that the RadDock control will initiate postback | |
| // when its position changes on the client or any of the commands is clicked. | |
| //Using the trigger we will "ajaxify" that postback. | |
| dock.AutoPostBack = true; | |
| dock.CommandsAutoPostBack = true; | |
| } | |
| private void LoadWidget(RadDock dock) | |
| { | |
| Control widget = LoadControl("~/UserControls/SampleUserControl.ascx"); | |
| dock.ContentContainer.Controls.Add(widget); | |
| } | |
| #endregion | |
| } | |
| } | |
| <telerik:RadTreeView ID="AvailableDataFields_TreeView" runat="server" on OnClientContextMenuItemClicked="ContextMenuClick" OnClientDoubleClick="LinkField"> |
| <ContextMenus> |
| <telerik:RadTreeViewContextMenu runat="server" ID="RadTreeViewContextMenu1" ClickToOpen="True" > |
| <Items> |
| <telerik:RadMenuItem ImageUrl="../../images/Data.gif" Text="Add to Data Tab"></telerik:RadMenuItem> |
| <telerik:RadMenuItem ImageUrl="../../images/Filter.gif" Text="Add to Filter Tab"></telerik:RadMenuItem> |
| <telerik:RadMenuItem ImageUrl="../../images/Sort.gif" Text="Add to Order Tab"></telerik:RadMenuItem> |
| </Items> |
| </telerik:RadTreeViewContextMenu> |
| </ContextMenus> |
| </telerik:RadTreeView> |
| oData = oCmd.ExecuteReader |
| Do While oData.Read |
| Dim oNode As New RadTreeNode |
| sDesc = oData("Description").ToString |
| If sDesc.Length > 50 Then |
| sDescsDesc = sDesc.Substring(0, 49) & "..." |
| End If |
| With oNode |
| .ToolTip = "Alias: " & oData("Alias").ToString & vbCrLf & "Description: " & sDesc |
| .Value = oData("TableID") |
| .ExpandMode = TreeNodeExpandMode.ServerSideCallBack |
| .Text = oData("Alias").ToString |
| End With |
| AvailableDataFields_TreeView.Nodes.Add(oNode) |
| Loop |
| Do While oData.Read |
| Dim oNode As New RadTreeNode |
| With oNode |
| .ToolTip = sTooltip |
| .Text = oData("Alias").ToString |
| .ExpandMode = TreeNodeExpandMode.ClientSide |
| .Value = oData("FieldID") |
| .ContextMenuID = "Report" |
| .CssClass = "TreeInnerNode" |
| .HoveredCssClass = "TreeInnerNodeOver" |
| .EnableContextMenu = True |
| End With |
| e.Node.Nodes.Add(oNode) |

<%@ Page language="C#" ....
<%@ Register TagPrefix="Telerik" Namespace="Telerik.SharePoint.FieldEditor" Assembly="RadEditorSharePoint, Version=5.1.0.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" %>
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
<Telerik:RadHtmlField FieldName="PublishingPageContent" runat="server" InputFieldLabel="Body" id="RichHtmlField"/>
</asp:Content>
<----------- PAGELAYOUT ----------->
When in displaymode it works fine, but when i go in edit mode I get the following exception:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
And the stack trace:
[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
System.Web.UI.ControlCollection.Add(Control child) +11013946
Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) +1116
Telerik.Web.UI.RadEditor.OnPreRender(EventArgs e) +16
Telerik.SharePoint.MOSSRadEditor.OnPreRender(EventArgs e) +54
System.Web.UI.Control.PreRenderRecursiveInternal() +108
...
The solution deployment and feature activation is done without errors. Any ideas on what can cause this behavior?
<
telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Transparency="30"
BackColor="#E0E0E0">
<asp:Image Style="margin-top: 10px" ID="Image1" runat="server" AlternateText="Loading..."
BorderWidth="0px" ImageUrl="~/images/loading.gif"></asp:Image>
</telerik:RadAjaxLoadingPanel>
<p class="caption">
<span>Search / List Contracts</span>
</p>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
<
div class="boxbg aleft">
<p class="minicaption">
Search Criteria
</p>
<p class="note">
Enter Search Criteria and click Search button to list units. To list all units,
do not enter any search criteria.
</p>
<fieldset>
<%
-- ContractHolderName--%>
<label class="formlabel">
<span class="reqfld"></span>Contract Holder Name</label>
<telerik:RadComboBox ID="raddropdownlistContractHolder" runat="server" Width="300px"
Height="200px" Skin="Web20" DataTextField="Name" DataValueField="ID" AppendDataBoundItems="true"
EnableEmbeddedSkins="false" MarkFirstMatch="true">
</telerik:RadComboBox>
<br />
<%
-- Site Name--%>
<label class="formlabel">
<span class="reqfld"></span>Site Name</label>
<telerik:RadComboBox ID="raddropdownlistSiteName" runat="server" Width="300px" Height="200px"
Skin="Web20" DataTextField="Name" DataValueField="ID" AppendDataBoundItems="true"
EnableEmbeddedSkins="false" MarkFirstMatch="true">
</telerik:RadComboBox>
<br />
<%
--Specialty--%>
<label for="dropdownlistSpecialties" class="formlabel left">
Specialty
</label>
<telerik:RadComboBox ID="raddropdownlistSpecialties" runat="server" Width="300px"
Height="200px" Skin="Web20" DataTextField="DisplayName" DataValueField="DisplayID"
AppendDataBoundItems="true" EnableEmbeddedSkins="false" MarkFirstMatch="true">
</telerik:RadComboBox>
<br />
<%
--Skills--%>
<label for="dropdownlistSkills" class="formlabel left">
Skills
</label>
<telerik:RadComboBox ID="raddropdownlistSkills" runat="server" Width="300px" Height="200px"
Skin="Web20" DataTextField="DisplayName" DataValueField="DisplayID" AppendDataBoundItems="true"
EnableEmbeddedSkins="false" MarkFirstMatch="true">
</telerik:RadComboBox>
<%
--Report Type--%>
<label for="dropdownlistSkills" class="formlabel left">
Create Report as
</label>
<asp:RadioButtonList ID="radioReport" runat="server" CssClass="formlabel1" RepeatDirection="Horizontal">
<asp:ListItem Text="Adobe PDF" Value="pdf" Selected></asp:ListItem>
<asp:ListItem Text="Microsoft Excel" Value="xls"></asp:ListItem>
</asp:RadioButtonList>
</fieldset>
</div>
<div class="btnpnl">
<asp:ImageButton ID="buttonReport" runat="server" CausesValidation="false" OnClick="buttonReport_Click"
AlternateText="Report" ImageUrl="~/Images/report_btn.gif" OnClientClick="Javascript:Auto() ;" />
</div>
</telerik:RadAjaxPanel>
protected void buttonReport_Click(object sender, EventArgs e)
{
try
{
// this.FillBusinessObjects();
//IList<ClinicalUnit> clinicalUnits = ReportController.RetrieveUnitReportForSearchData();
// radgridUnits.DataSource = clinicalUnits;
// radgridUnits.DataBind();
DataSet dataSetUnit = new DataSet();
DataTable dataTableUnit = ConstructDataTableUnit();
this.FillBusinessObjects();
IList<ClinicalUnit> clinicalUnits = ReportController.RetrieveUnitReportForSearchData();
//radgridUnits.DataSource = clinicalUnits;
//radgridUnits.DataBind();
if (clinicalUnits.Count > 0)
{
for (int i = 0; i < clinicalUnits.Count; i++)
{
DataRow dataRowUnit = dataTableUnit.NewRow();
dataRowUnit[
"UnitID"] = clinicalUnits[i].ID.ToString();
dataRowUnit[
"UnitName"] = clinicalUnits[i].Name.ToString();
dataRowUnit[
"SiteName"] = clinicalUnits[i].Site.Name.ToString();
dataRowUnit[
"Status"] = clinicalUnits[i].StatusText.ToString();
dataRowUnit[
"Specialty"] = clinicalUnits[i].Specialty.Name.ToString();
dataRowUnit[
"Skills"] = clinicalUnits[i].Skill.Name.ToString();
dataRowUnit[
"Population"] = clinicalUnits[i].Population.Name.ToString();
dataRowUnit[
"AcceptGrad"] = clinicalUnits[i].IsGraduationText.ToString();
dataRowUnit[
"AcceptUnderGraduation"] = clinicalUnits[i].IsUnderGraduationText.ToString();
dataRowUnit[
"ServiceLearning"] = clinicalUnits[i].IsServiceLearningText.ToString();
dataRowUnit[
"NoOfStudents"] = clinicalUnits[i].NoOfStudent.ToString();
dataRowUnit[
"UnitContactName"] = clinicalUnits[i].ContactFirstName.ToString();
dataRowUnit[
"UnitContactPhone"] = clinicalUnits[i].ContactPhone.ToString();
dataRowUnit[
"UnitContactEmail"] = clinicalUnits[i].ContactEMail.ToString();
dataTableUnit.Rows.Add(dataRowUnit);
}
dataSetUnit.Tables.Add(dataTableUnit);
ExportReport(dataSetUnit);
}
else
ClientScript.RegisterStartupScript(
this.GetType(), "onclick", "<script language='javascript'>alert('No Records Found');</script>");
}
catch (SofturaException softuraException)
{
// throw softuraException;
}
catch (Exception exception)
{
// throw exception;
}
}
private DataTable ConstructDataTableUnit()
{
DataTable dtUnit = new DataTable("dataTableUnit");
dtUnit.Columns.Add(
"UnitID");
dtUnit.Columns.Add(
"UnitName");
dtUnit.Columns.Add(
"SiteName");
dtUnit.Columns.Add(
"Status");
dtUnit.Columns.Add(
"Specialty");
dtUnit.Columns.Add(
"Skills");
dtUnit.Columns.Add(
"Population");
dtUnit.Columns.Add(
"AcceptGrad");
dtUnit.Columns.Add(
"AcceptUnderGraduation");
dtUnit.Columns.Add(
"ServiceLearning");
dtUnit.Columns.Add(
"NoOfStudents");
dtUnit.Columns.Add(
"UnitContactName");
dtUnit.Columns.Add(
"UnitContactPhone");
dtUnit.Columns.Add(
"UnitContactEmail");
return dtUnit;
}
private void ExportReport(DataSet dataSetUnit)
{
string sReportType = radioReport.SelectedValue;
UnitReportXSD objUnits = new UnitReportXSD();
objUnits.Merge(dataSetUnit);
ReportDocument rdUnits = new ReportDocument();
rdUnits.Load(Server.MapPath(
"UnitReport.rpt"));
ExportOptions expOpt = new ExportOptions();
DiskFileDestinationOptions dskOpt = new DiskFileDestinationOptions();
rdUnits.SetDataSource(objUnits);
string sBaseURL = Request.PhysicalApplicationPath.ToString() + ConfigurationSettings.AppSettings["UnitReportPath"].ToString();
//FileInfo fileInfo = new FileInfo(sBaseURL + "UnitReport.xls");
FileInfo fileInfo = new FileInfo(sBaseURL + "UnitReport." + sReportType);
fileInfo.IsReadOnly =
false;
//dskOpt.DiskFileName = sBaseURL + "UnitReport.xls";
dskOpt.DiskFileName = sBaseURL +
"UnitReport." + sReportType;
expOpt = rdUnits.ExportOptions;
expOpt.ExportDestinationOptions = dskOpt;
expOpt.ExportDestinationType =
ExportDestinationType.DiskFile;
if (sReportType.ToUpper().Equals("PDF"))
expOpt.ExportFormatType =
ExportFormatType.PortableDocFormat;
else
expOpt.ExportFormatType =
ExportFormatType.Excel;
rdUnits.Export();
DownloadReport(sReportType);
}
private void DownloadReport(string sReportType)
{
try
{
string sBaseURL = Request.PhysicalApplicationPath.ToString() + "Units\\UnitReport." + sReportType;
Response.ClearHeaders();
Response.AddHeader(
"content-disposition", "attachment; filename=UnitReport." + sReportType);
if (sReportType.ToUpper().Equals("PDF"))
Response.ContentType =
"application/force-download";
else
Response.ContentType =
"application/vnd.ms-excel";
Response.WriteFile(sBaseURL);
Response.End();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}