Re: Adding Pages

The problem is, that the SetActivePage(string newPageName) searches for the NAME-Property of the WizardPage. So if you add 2 MiddlePages, which have the same Name, this method can't differ them.

That means -> Instead of:
this.Pages.Add(new WelcomePage());
this.Pages.Add(new MiddlePage());
this.Pages.Add(new MiddlePage());
this.Pages.Add(new CompletePage());


you can use:

MiddlePage mp = new MiddlePage();
mp.Name = "MidPage";

MiddlePage mp2 = new MiddlePage();
mp2.Name = "MidPage2";

this.Pages.Add(new WelcomePage());
this.Pages.Add(mp);
this.Pages.Add(mp2);
this.Pages.Add(new CompletePage());


Now this should work :D

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <br> <code> <dd> <dl> <dt> <hr> <h1> <h2> <h3> <i> <img> <li> <ol> <p> <pre> <table> <td> <th> <tr> <tt> <u> <ul>
  • Images can be added to this post.

More information about formatting options