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 8612 Frinavale 9,735
Recognized Expert Moderator Expert
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=AmendCr eateCustomerTes t&DisplaySteps= 1
Source: System.Web.Exte nsions
Message: Extender control 'txt_PostalAddr essLine1_TextBo xWatermarkExten der' is not a registered extender control. Extender controls must be registered using RegisterExtende rControl() before calling RegisterScriptD escriptors(). Parameter name: extenderControl
Stack trace: at System.Web.UI.S criptControlMan ager.RegisterSc riptDescriptors (IExtenderContr ol extenderControl ) at System.Web.UI.S criptManager.Re gisterScriptDes criptors(IExten derControl extenderControl ) at System.Web.UI.E xtenderControl. Render(HtmlText Writer writer) at AjaxControlTool kit.ExtenderCon trolBase.Render (HtmlTextWriter writer) at System.Web.UI.C ontrol.RenderCo ntrolInternal(H tmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer, ControlAdapter adapter) at System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer) at System.Web.UI.C ontrol.RenderCh ildrenInternal( HtmlTextWriter writer, ICollection children) at System.Web.UI.C ontrol.RenderCh ildren(HtmlText Writer......... ............... ............... ....
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%">
Frinavale 9,735
Recognized Expert Moderator Expert
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....becau se I can't tell why you are registering the System.Web.Exte nsion 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 the Controls.Add() method several times or even calling the Controls.AddRange() method once can take a huge amount of time. Therefore, I would like to be able to run the loop that creates the controls on a different thread and meanwhile give the user...
|
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 created new custom button called "My Custom
Button" in the Outlook menu bar.
But when I tried to create one more button called "Forward Mail" (code is
|
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 ListView columns so it should be doable, thanks
|
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 how those properties are
set.
I want to be able to do two other things:
a) add User control instances to my page, filling in the place of
placeholder controls, and
b) programmatically setting custom properties on those dynamically spawned...
| |
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, Footer, Side bar and Body
One of the content panels would use a Wizard control stepping the
user
through submitting an Ergonomic Review Request.
|
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 the form load event. Why should it fire when I put a button in
a update panel? Is this necessary and is only the other controls related to
the update panel send back? Or the whole page (If this is true I really do
not get it). But please answer...
|
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 to wrap the control in the proper control type - which is also
a container.
At design time I want to be able to turn this :
<my:container>
<asp:textbox />
|
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
tabcontainer which has 1 panel already, however I want to try create the
TabPanels dynamically. I followed the advice here:
http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe
Stagner)
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |