Solved

Removing wizardsteps in vb.net gives the error "Argument out of rabge exception"

Posted on 2009-07-13
3
203 Views
Last Modified: 2013-11-26
I have 6 wizardsteps, represented as 6 buttons in the SideBar (not using Next and Previous buttons)
For some records in the db I do not need wizardstep 5 an 6
If I click on wizardstep 5 or 6 and then move to a record which doesn't need step 5 and 6, I do:
 wizardStep.RemoveAt(6)
 wizardStep.RemoveAt(5)

This gives the crash error "Argument out of range exception".
If I move to wizardstep 4, before moving on to changing record, things goes well
I hav tried all ways of workarounds I feel, with no success
0
Comment
Question by:Joar
  • 2
3 Comments
 
LVL 8

Expert Comment

by:dericstone
ID: 24843428
It's not clear why you want to remove wizard steps. Don't you just want to skip over some?

In any case, I think the wizard steps are indexed with a base zero index. So index 6 might not exist - use indices 0 - 5. You can check this by calling IndexOf on the wizard steps you are interested in skipping.

If I'm not helping here, please post some code.
0
 

Author Comment

by:Joar
ID: 24843657
No, I want to remove the steps, because they are meaningless for some records.
I know about the zero based step index, so in the example above I ment to remove steps 4 and 5...

May be I should use another technique than wizardsteps, for example multiview??
The only thning I want is having some buttons in the left margin.
Clicking on different buttons, I want to display different windows in the right part of the page.

0
 

Accepted Solution

by:
Joar earned 0 total points
ID: 24847659
The MultiView was the answer to my problem
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now