[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

Subclassed Wizard Control Doesn't Pass Through Design Time Behavior

Mark Olbert

2/14/2007 6:28:00 PM

I wrote a customized derivation of the Wizard control, which works fine at runtime, but doesn't behave properly at design-time.
Specifically, when I click on the links for the individual steps at design time, the display doesn't update to let me see (and edit)
the controls contained in that particular step. Instead, the display stays locked on whatever the first step of the wizard is.

I thought this might be because I needed to decorate my derived class with [Designer(typeof(WizardDesigner))], but that didn't solve
the problem.

How do I "pass through" the design-time behavior of a webcontrol in a derived web control?

- Mark
1 Answer

wawang

2/15/2007 6:11:00 AM

0

Hi Mark,

I just verified the behavior of customized webcontrol design-time behavior
using following simple test and it works correctly:

1) In App_Code, create following class:

using System.Web.UI.WebControls;
namespace myns
{
public class Class1 : Wizard
{

}
}

2) In Default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<%@ Register TagPrefix="c" Namespace="myns" Assembly="__code" %>

<!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/x... >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
def</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2">
abc</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

<c:Class1 ID="Wizard2" runat="server" ActiveStepIndex="1">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step
1">
def</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step
2">
abc</asp:WizardStep>
</WizardSteps>
</c:Class1>

</div>
</form>
</body>
</html>


Both Wizard controls are working correctly at design-time: clicking on Step
1 or Step 2 will correctly switch the step.


Would you please verify the behavior of this simple test on your side?

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.