ASP.NET Wizard Help

D

Davie

I've got a slight problem with the ASP.NET wizard. The wizard is designed
to build an array of items. The first WizardStep asks how many items there
are. I then have another WizardStep which is used to create an item. I
wish to repeat this step as many times as required, depending on how many
items i have.


Step 1. Determine how many items

Step 2. Build Item * repeated until all the number of items have been
built.

This step adds items to an array.

Step 3. Complete


The problem is, when I wish to repeat the step. It doesn't seem to work!!

If the current item, is less than the total number of items, then I still
have more items to add.

void Wizard1_NextButtonClick(object sender,
System.Web.UI.WebControls.WizardNavigationEventArgs e)
{
if (Wizard1.ActiveStepIndex == 1)
{
if (currentitem<totalitems)
{
Wizard1.ActiveStepIndex = 1;
} else {
Wizard1.ActiveStepIndex = 2;
}
}

I've also tried this.Wizard1.MoveTo(this.Step2); instead of changing the
activestepindex.

Please could someone advise me ??

Many thanks.
 
S

Steven Cheng[MSFT]

Thanks for Brock's input,

Hi Davie,

As Brock has mentioned, the Wizard control's NextButtonClick event has a
"WizardNavigationEventArgs" parameter that contains a "Cancel" property
help to cancel the current next navigation operation. Also, Wizard control
has "ActiveStepChanged" event which can help determine the current and next
step and we can also manually reset the ActiveStep in such event handler as
you like.

Hope also helps. Thanks,


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| Message-ID: <[email protected]>
| From: Brock Allen <[email protected]>
| Subject: Re: ASP.NET Wizard Help
| References: <[email protected]>
| Mime-Version: 1.0
| Content-Transfer-Encoding: 8bit
| Content-Type: text/plain; charset=iso-8859-1; format=flowed
| X-Newsreader: JetBrains Omea Reader 469.1
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Date: Mon, 05 Sep 2005 09:49:19 -0700
| NNTP-Posting-Host: c-66-30-185-175.hsd1.ma.comcast.net 66.30.185.175
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:122472
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Try setting WizardNavigationEventArgs.Cancel = true
|
| -Brock
| DevelopMentor
| http://staff.develop.com/ballen
|
|
|
| > I've got a slight problem with the ASP.NET wizard. The wizard is
| > designed to build an array of items. The first WizardStep asks how
| > many items there are. I then have another WizardStep which is used to
| > create an item. I wish to repeat this step as many times as required,
| > depending on how many items i have.
| >
| > Step 1. Determine how many items
| >
| > Step 2. Build Item * repeated until all the number of items have
| > been built.
| >
| > This step adds items to an array.
| >
| > Step 3. Complete
| >
| > The problem is, when I wish to repeat the step. It doesn't seem to
| > work!!
| >
| > If the current item, is less than the total number of items, then I
| > still have more items to add.
| >
| > void Wizard1_NextButtonClick(object sender,
| > System.Web.UI.WebControls.WizardNavigationEventArgs e)
| > {
| > if (Wizard1.ActiveStepIndex == 1)
| > {
| > if (currentitem<totalitems)
| > {
| > Wizard1.ActiveStepIndex = 1;
| > } else {
| > Wizard1.ActiveStepIndex = 2;
| > }
| > }
| > I've also tried this.Wizard1.MoveTo(this.Step2); instead of changing
| > the activestepindex.
| >
| > Please could someone advise me ??
| >
| > Many thanks.
| >
|

|
|
 
D

Davie

Many thanks.


Steven Cheng said:
Thanks for Brock's input,

Hi Davie,

As Brock has mentioned, the Wizard control's NextButtonClick event has a
"WizardNavigationEventArgs" parameter that contains a "Cancel" property
help to cancel the current next navigation operation. Also, Wizard control
has "ActiveStepChanged" event which can help determine the current and
next
step and we can also manually reset the ActiveStep in such event handler
as
you like.

Hope also helps. Thanks,


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| Message-ID: <[email protected]>
| From: Brock Allen <[email protected]>
| Subject: Re: ASP.NET Wizard Help
| References: <[email protected]>
| Mime-Version: 1.0
| Content-Transfer-Encoding: 8bit
| Content-Type: text/plain; charset=iso-8859-1; format=flowed
| X-Newsreader: JetBrains Omea Reader 469.1
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Date: Mon, 05 Sep 2005 09:49:19 -0700
| NNTP-Posting-Host: c-66-30-185-175.hsd1.ma.comcast.net 66.30.185.175
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:122472
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Try setting WizardNavigationEventArgs.Cancel = true
|
| -Brock
| DevelopMentor
| http://staff.develop.com/ballen
|
|
|
| > I've got a slight problem with the ASP.NET wizard. The wizard is
| > designed to build an array of items. The first WizardStep asks how
| > many items there are. I then have another WizardStep which is used to
| > create an item. I wish to repeat this step as many times as required,
| > depending on how many items i have.
| >
| > Step 1. Determine how many items
| >
| > Step 2. Build Item * repeated until all the number of items have
| > been built.
| >
| > This step adds items to an array.
| >
| > Step 3. Complete
| >
| > The problem is, when I wish to repeat the step. It doesn't seem to
| > work!!
| >
| > If the current item, is less than the total number of items, then I
| > still have more items to add.
| >
| > void Wizard1_NextButtonClick(object sender,
| > System.Web.UI.WebControls.WizardNavigationEventArgs e)
| > {
| > if (Wizard1.ActiveStepIndex == 1)
| > {
| > if (currentitem<totalitems)
| > {
| > Wizard1.ActiveStepIndex = 1;
| > } else {
| > Wizard1.ActiveStepIndex = 2;
| > }
| > }
| > I've also tried this.Wizard1.MoveTo(this.Step2); instead of changing
| > the activestepindex.
| >
| > Please could someone advise me ??
| >
| > Many thanks.
| >
|

|
|
 
S

Steven Cheng[MSFT]

You're welcome :)

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Davie" <[email protected]>
| References: <[email protected]>
<[email protected]>
<$Yn#[email protected]>
| Subject: Re: ASP.NET Wizard Help
| Date: Tue, 6 Sep 2005 17:29:46 +0100
| Lines: 104
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 82-41-9-147.cable.ubr02.edin.blueyonder.co.uk
82.41.9.147
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:122645
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Many thanks.
|
|
| | > Thanks for Brock's input,
| >
| > Hi Davie,
| >
| > As Brock has mentioned, the Wizard control's NextButtonClick event has a
| > "WizardNavigationEventArgs" parameter that contains a "Cancel" property
| > help to cancel the current next navigation operation. Also, Wizard
control
| > has "ActiveStepChanged" event which can help determine the current and
| > next
| > step and we can also manually reset the ActiveStep in such event
handler
| > as
| > you like.
| >
| > Hope also helps. Thanks,
| >
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| > --------------------
| > | Message-ID: <[email protected]>
| > | From: Brock Allen <[email protected]>
| > | Subject: Re: ASP.NET Wizard Help
| > | References: <[email protected]>
| > | Mime-Version: 1.0
| > | Content-Transfer-Encoding: 8bit
| > | Content-Type: text/plain; charset=iso-8859-1; format=flowed
| > | X-Newsreader: JetBrains Omea Reader 469.1
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | Date: Mon, 05 Sep 2005 09:49:19 -0700
| > | NNTP-Posting-Host: c-66-30-185-175.hsd1.ma.comcast.net 66.30.185.175
| > | Lines: 1
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:122472
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Try setting WizardNavigationEventArgs.Cancel = true
| > |
| > | -Brock
| > | DevelopMentor
| > | http://staff.develop.com/ballen
| > |
| > |
| > |
| > | > I've got a slight problem with the ASP.NET wizard. The wizard is
| > | > designed to build an array of items. The first WizardStep asks how
| > | > many items there are. I then have another WizardStep which is used
to
| > | > create an item. I wish to repeat this step as many times as
required,
| > | > depending on how many items i have.
| > | >
| > | > Step 1. Determine how many items
| > | >
| > | > Step 2. Build Item * repeated until all the number of items have
| > | > been built.
| > | >
| > | > This step adds items to an array.
| > | >
| > | > Step 3. Complete
| > | >
| > | > The problem is, when I wish to repeat the step. It doesn't seem to
| > | > work!!
| > | >
| > | > If the current item, is less than the total number of items, then I
| > | > still have more items to add.
| > | >
| > | > void Wizard1_NextButtonClick(object sender,
| > | > System.Web.UI.WebControls.WizardNavigationEventArgs e)
| > | > {
| > | > if (Wizard1.ActiveStepIndex == 1)
| > | > {
| > | > if (currentitem<totalitems)
| > | > {
| > | > Wizard1.ActiveStepIndex = 1;
| > | > } else {
| > | > Wizard1.ActiveStepIndex = 2;
| > | > }
| > | > }
| > | > I've also tried this.Wizard1.MoveTo(this.Step2); instead of
changing
| > | > the activestepindex.
| > | >
| > | > Please could someone advise me ??
| > | >
| > | > Many thanks.
| > | >
| > |
| >
| > |
| > |
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top