Hi guys,
I have a problem where i have a web page (inheriting from a master page which contains the scriptmanager control) containing a dynamically created wizard control. At runtime i add the steps from custom controls i have created, basically simulating content etc. Now - when i try to add ajax extenders to the custom controls it errors out on load and says that the controls havent been registered - have scoured the web but cant seem to find any info re what the cause/solution is - help please.
3 8586
Please post the error details.
Thanks for the reply - i get the below error:
Offending URL: http://localhost:1583/Secured Lending Portal/Wizard/WizardPage.aspx?Action=AmendCreateCustomerTest&Dis playSteps=1
Source: System.Web.Extensions
Message: Extender control 'txt_PostalAddressLine1_TextBoxWatermarkExtender' is not a registered extender control. Extender controls must be registered using RegisterExtenderControl() before calling RegisterScriptDescriptors(). Parameter name: extenderControl
Stack trace: at System.Web.UI.ScriptControlManager.RegisterScriptD escriptors(IExtenderControl extenderControl) at System.Web.UI.ScriptManager.RegisterScriptDescript ors(IExtenderControl extenderControl) at System.Web.UI.ExtenderControl.Render(HtmlTextWrite r writer) at AjaxControlToolkit.ExtenderControlBase.Render(Html TextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWrite r...........................................
The only things that would really affect the config ive listed in the below tags, for the rest ive provided a trail of code as it would move between the artefacts - would really appreciate some or other resolution - really frustrating me.
WEB.CONFIG - <configuration>
-
-
"system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
-
"scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
-
"scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication">
WIZARD CONTAINER MARKUP -
"C#" AutoEventWireup="true" CodeFile="WizardPage.aspx.cs" Inherits="SBSA.VAF.UI.Shell.Views.WizardPage" Title="WizardPage" MasterPageFile="~/Shared/DefaultMaster.master" %>
-
-
"Microsoft.Practices.Web.UI.WebControls" namespace="Microsoft.Practices.Web.UI.WebControls" tagprefix="asp" %>
-
"../Controls/UI/Navigation/StepBar.ascx" tagname="StepBar" tagprefix="uc1" %>
-
"System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
-
"~/Controls/UI/Functions/ErrorDisplay.ascx" tagname="ErrorDisplay" tagprefix="uc2" %>
-
"AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
-
-
"content" ContentPlaceHolderID="DefaultContent" Runat="Server">
-
"text/css" rel ="Stylesheet" href="Wizard.css" >
-
"imgStage" runat="server" Height="70px" Width="700px">
-
-
"PlaceHolderStepBar" runat="server">
-
"WizardControl" runat="server">
-
"PlaceHolder1" runat="server">
-
"ObjectContainerDataSourceWizard" runat="server">
-
WIZARD CONTAINER CODE BEHIND -
namespace SBSA.VAF.UI.Shell.Views
-
{
-
-
public partial class WizardPage : Microsoft.Practices.CompositeWeb.Web.UI.Page, IWizardPageView,INavigationService
-
{
-
public string workflow;
-
private PageFlowObject.PageFlowIndex pageFlowIndex = null;
-
private PageFlow pageFlow = new PageFlow();
-
private INavigationService _navigationService = new WebNavigationService();
-
-
private WizardPagePresenter _presenter;
-
//TO DO: REMOVE. PLACED FOR TRYING TO FIND A NIGGLY PAGE ERROR/
-
protected override void OnError(EventArgs e)
-
{
-
-
HttpContext ctx = HttpContext.Current;
-
-
Exception exception = ctx.Server.GetLastError();
-
-
string errorInfo =
-
"<br>Offending URL: " + ctx.Request.Url.ToString() +
-
"<br>Source: " + exception.Source +
-
"<br>Message: " + exception.Message +
-
"<br>Stack trace: " + exception.StackTrace;
-
-
ctx.Response.Write(errorInfo);
-
-
// --------------------------------------------------
-
// Clear the error
-
// --------------------------------------------------
-
ctx.Server.ClearError();
-
-
base.OnError(e);
-
}
-
protected void Page_PreInit(object sender, EventArgs e)
-
{
-
-
}
-
protected void Page_Load(object sender, EventArgs e)
-
{
-
-
WizardControl.NavigationButtonStyle.CssClass = "ButtonWizard";
-
WizardControl.FinishCompleteButtonText = "Next";
-
WizardControl.DisplaySideBar = false;
-
WizardControl.NextButtonClick += new WizardNavigationEventHandler(WizardMain_NextButtonClick);
-
WizardControl.ActiveStepChanged += new EventHandler(WizardControl_ActiveStepChanged);
-
WizardControl.PreviousButtonClick += new WizardNavigationEventHandler(WizardControl_PreviousButtonClick);
-
WizardControl.FinishButtonClick += new WizardNavigationEventHandler(WizardMain_FinishButtonClick);
-
-
string workflow = Request.QueryString["Action"];
-
-
-
-
//INTERNAL CONTROLS
-
//Building up the step Navigator
-
pageFlowIndex = pageFlow.GetPageFlowSteps(workflow);
-
//Clear the dummy steps
-
WizardControl.WizardSteps.Clear();
-
-
int outofRangeIndex = 0;
-
try
-
{
-
-
for (int i = 0; i <= pageFlowIndex.StepCount - 1; i++)
-
{
-
outofRangeIndex = i;
-
WizardStep ws = new WizardStep();
-
ws.Title = pageFlowIndex.PageFlowSteps[i].StepName;
-
ws.StepType = WizardStepType.Auto;
-
WizardControl.WizardSteps.Add(ws);
-
-
-
}
-
}
-
//M WARD. A Shameless Dirty Hack but time is against me.
-
catch (ArgumentOutOfRangeException)
-
{
-
-
//TO DO: Comeback and refactor
-
pageFlowIndex = pageFlow.GetPageFlowSteps(workflow);
-
//Clear the dummy steps
-
WizardControl.WizardSteps.Clear();
-
for (int x = 0; x <= outofRangeIndex - 1; x ++)
-
{
-
-
WizardStep ws = new WizardStep();
-
ws.Title = pageFlowIndex.PageFlowSteps[x].StepName;
-
ws.StepType = WizardStepType.Auto;
-
WizardControl.WizardSteps.Add(ws);
-
-
}
-
}
-
-
PlaceHolder1.Controls.Add(WizardControl);
-
-
-
if (!this.IsPostBack)
-
{
-
//this._presenter.OnViewInitialized();
-
//BUILD THE STAGE STEPS FOR THE FIRST TIME
-
WizardControl_StepsCreate(0);
-
-
}
-
-
-
//Loading the custom control into the wizard container
-
for (int i = 0; i < WizardControl.WizardSteps.Count; i++)
-
{
-
WizardStepBase ws = WizardControl.WizardSteps[i];
-
PageFlowObject.PageFlowPage target = pageFlow.GetPageFlow(i, workflow);
-
if (target.Source == null)
-
{
-
break;
-
}
-
if (i == WizardControl.ActiveStepIndex)
-
{
-
StageBarSource(target.StageID, target.StageStepID);
-
}
-
//Check to see if the next Button is to be disabled for the submit
-
if (target.OverRideNextWizardButton == "1")
-
{
-
WizardControl.NavigationButtonStyle.CssClass = "oculto";
-
}
-
Control b = null;
-
b = Page.LoadControl(target.Source);
-
b.ID = "PageFlowFormControl" + i;
-
ws.Controls.Add(b);
-
WizardControl.WizardSteps.Insert(i, ws);
-
}
-
}
-
-
[CreateNew]
-
public WizardPagePresenter Presenter
-
{
-
get
-
{
-
return this._presenter;
-
}
-
set
-
{
-
if (value == null)
-
throw new ArgumentNullException("value");
-
-
this._presenter = value;
-
this._presenter.View = this;
-
}
-
}
-
-
#region CREATE STEP FUNCTION
-
/// <summary>
-
/// Creates the Stage Steps
-
/// </summary>
-
/// <param name="currentStep"></param>
-
void WizardControl_StepsCreate(int currentStep)
-
{
-
-
///DISPLAY CONTROLS//
-
///*STEP BAR / Navigator*/
-
if (pageFlowIndex.DisplaySteps == "0")
-
{
-
StringBuilder sb = new StringBuilder();
-
sb.Append("<tr>");
-
Table TableSteps = new Table();
-
TableSteps.Rows.Add(new TableRow());
-
-
int x = 0;
-
foreach (WizardStep w in WizardControl.WizardSteps)
-
{
-
TableCell tc = new TableCell();
-
-
if (currentStep == x)
-
{
-
tc.CssClass = "StepBarCurrent";
-
}
-
-
tc.Text = "<span class='LargeFont'><strong>Step " + (x + 1) + "</strong></span><br/>";
-
tc.Text += "<div class='SmallFont'>" + w.Title + "</div>";
-
TableSteps.Rows[0].Cells.Add(tc);
-
-
if (w.StepType != WizardStepType.Finish)
-
{
-
tc = new TableCell();
-
tc.BackColor = System.Drawing.Color.Silver;
-
TableSteps.Rows[0].Cells.Add(tc);
-
}
-
x++;
-
}
-
PlaceHolderStepBar.Controls.Add(TableSteps);
-
//// /*END STEPBAR*/
-
}
-
}
-
-
#endregion
-
-
-
#region Wizard control events
-
-
void WizardControl_PreviousButtonClick(object sender, WizardNavigationEventArgs e)
-
{
-
WizardControl.ActiveStepIndex = (e.CurrentStepIndex -1);
-
WizardControl_StepsCreate(e.CurrentStepIndex - 1);
-
-
}
-
-
void WizardControl_ActiveStepChanged(object sender, EventArgs e)
-
{
-
-
-
-
}
-
-
public void WizardMain_NextButtonClick(object sender, WizardNavigationEventArgs e)
-
{
-
-
-
WizardControl_StepsCreate(e.NextStepIndex);
-
-
if ((pageFlowIndex.StepCount - 1) == WizardControl.ActiveStepIndex)
-
{
-
NavigateAction(Screen.NavWizard, pageFlowIndex.FinalRoute.ToString());
-
}
-
else
-
{
-
WizardControl.ActiveStepIndex = e.NextStepIndex;
-
}
-
-
-
}
-
-
protected void WizardMain_FinishButtonClick(object sender, WizardNavigationEventArgs e)
-
{
-
-
NavigateAction(Screen.NavWizard, pageFlowIndex.FinalRoute.ToString());
-
}
-
-
#endregion
-
-
public void StageBarSource(string StageID,string StageStepID)
-
{
-
this.imgStage.Attributes.Add("src","generateStageImage.aspx?workflowStage=" + StageID + "&workflowstageStep=" + StageStepID);
-
}
AN EXAMPLE OF CUSTOM CONTROL LOADED IN AT RUNTIME
HTML MARKUP WITH WATERMARK AS EXAMPLE OF ERROR -
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Application_CustomerAddressDetails.ascx.cs" Inherits="SBSA.VAF.UI.VAF.Views.Application_CustomerAddressDetails" %>
-
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
-
-
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
-
<%@ Register Assembly="Microsoft.Practices.Web.UI.WebControls" namespace="Microsoft.Practices.Web.UI.WebControls" tagprefix="pp" %>
-
-
<%@ Register Assembly="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet" Namespace="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet" TagPrefix="EntLibValidators"%>
-
<%@ Register src="~/Controls/UI/Functions/ErrorDisplay.ascx" tagname="ErrorDisplay" tagprefix="uc1" %>
-
-
<link href="../../../Wizard/Wizard.css" rel="Stylesheet" type="text/css" />
-
<table align="left" cellpadding="0" cellspacing="0" width="100%">
Well you're web.config looks messed up to me.
I'm not sure if it's just how you have copy/pasted it but it should look like: -
<configuration>
-
<configSections>
-
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
-
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
-
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
-
-
-
..................
-
In fact, a lot of your code seems to be cut off.....
Could you please post your code again for your web.config and for the Wizard Container Markup....because I can't tell why you are registering the System.Web.Extension here.....??
Your code may have been cut of by the forum in order to protect against potential harmful data so make sure you post your code in tags.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: avivgur |
last post by:
Hello,
I am writing a program in Visual C# and I have encountered a problem.
In my program I want to dynamically create a multitude of controls (thousands) on a form. The problem is that calling...
|
by: Shimon Sim |
last post by:
I have a custom composite control
I have following property
|
by: Kannan |
last post by:
Hi,
I am trying to created Outloook Add-in Com in outlook using C#.
I have seen this URL for developing this sample
http://support.microsoft.com/?kbid=302901
When I executed this program it...
|
by: Pete Kane |
last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would
contain tab pages of my own classes, I know you can achieve this with...
|
by: |
last post by:
I have made some user controls with custom properties. I can set those
properties on instances of my user controls, and I have programmed my user
control to do useful visual things in response to...
|
by: BJ |
last post by:
I had this crazy idea. We have an existing application that could
use
some rework. I was going to redo the application (currently ASP.Net
1.1) using ASP.Net 2.0:
Master page with Header,...
|
by: =?Utf-8?B?VG9u?= |
last post by:
Hello,
I want to understand teh benefits of ajax technology. Does anyone has a good
website where AJAX EXTENSIONS is worked out so I really understand it.
There a 2 main questions:
1) How about...
|
by: gerry |
last post by:
I am trying to create a custom container control that will only ever contain
a specific type of control.
At design time, when a control of a different type is added to the container
I would like...
|
by: RichB |
last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am
trying to add a tabbed control to the page.
I have no problems within the aspx file, and can dynamically manipulate a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |