CodeSmith Community
Your Code. Your Way. Faster!

Error with .netTiers MultiFormView inside WizardStep

Latest post 08-07-2008 7:45 AM by krs1. 4 replies.
  • 11-02-2006 9:35 AM

    • Tanno
    • Top 100 Contributor
    • Joined on 10-06-2006
    • Posts 50
    • Points 1,215

    Error with .netTiers MultiFormView inside WizardStep

    Hi all,

    Placing a .netTiers MultiFormView inside an extra wizardstep of the CreateUserWizard

    causes the following rendering error in the design view:

    "There was an error rendering the control

    Object reference not set to an instance of an object"

    The script code is as follows:
     
    <asp:WizardStep ID="step1" runat="server" Title="Add Company">

      <data:MultiFormView ID="MultiFormView2" runat="server" DataKeyNames="BedrijfID" DataSourceID="BedrijfDataSource1" DefaultMode="Insert">

        <InsertItemTemplatePaths>

          <data:TemplatePath Path="~/Admin/UserControls/CompanyFields.ascx" />
     
        </InsertItemTemplatePaths>

      </data:MultiFormView>

    </asp:WizardStep>

    The same code placed outside the wizard on the same page does not cause a rendering error.

    Does anyone know a solution for this problem ?

    Any help appreciated.

    Filed under:
    • Post Points: 35
  • 11-02-2006 10:08 AM In reply to

    Re: Error with .netTiers MultiFormView inside WizardStep

    Can you post the entire stacktrace please?  And can you also post where you have the datasource in code.  I believe it might not be in scope.

    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 35
  • 11-03-2006 4:20 AM In reply to

    • Tanno
    • Top 100 Contributor
    • Joined on 10-06-2006
    • Posts 50
    • Points 1,215

    Re: Error with .netTiers MultiFormView inside WizardStep

    Well, the strange thing is that the error rendering the control only happens in the Design View, but not at run time.

    The design time error is however very inconvenient, because it makes it impossible to use the property editors of the CreateUserWizard so that the properties of other Wizardsteps can not be designed or changed. 

    Well, if I would have only 1 wizardstep with a MultiFormView I could work arround this bug by editing the properties of the other steps first, but in fact I need more then one wizardstep with MultiFormView.

    Of course I can also work arround this by  using a FormView instead of the .netTiers  MultiFormView, but that was not my purpose.

    I wanted to use the MultiFormView to reuse the insert templates by referencing their paths, instead of doing copy and paste and have double implementations of the same script code.

    The datasource control is placed outside of the CreateUserWizard control on the same page, see below:

    <asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="Server">

    <div id="col_mid_page">

    &nbsp;

    <br />

     

    <asp:CreateUserWizard ID="CreateUserWizard1" runat="server">

    <WizardSteps>

    <asp:WizardStep ID="step1" runat="server" Title="Add Company Info">

     

    <data:MultiFormView ID="FormViewTest2" runat="server" AllowPaging="false" DataKeyNames="BedrijfID"

    DataSourceID="BedrijfDataSource1" DefaultMode="Insert">

     

    <InsertItemTemplatePaths>

    <data:TemplatePath Path="~/Admin/UserControls/BedrijfFields.ascx" />

    </InsertItemTemplatePaths>

     

    </data:MultiFormView>

     

    </asp:WizardStep>

     

    <asp:CreateUserWizardStep ID="step2" runat="server">

    </asp:CreateUserWizardStep>

     

    <asp:CompleteWizardStep ID="step3" runat="server">

    </asp:CompleteWizardStep>

    </WizardSteps>

    </asp:CreateUserWizard>

     

    <data:BedrijfDataSource ID="BedrijfDataSource1" runat="server" SelectMethod="GetByBedrijfID">

    </data:BedrijfDataSource>

     

    </div>

    </asp:Content>

     

     

     

     

    Filed under:
    • Post Points: 5
  • 11-10-2006 8:52 AM In reply to

    • Tanno
    • Top 100 Contributor
    • Joined on 10-06-2006
    • Posts 50
    • Points 1,215

    Re: Error with .netTiers MultiFormView inside WizardStep

    Reply |Contact |Answer

    Work arround for the designtime error appears to be to cut the InsertItemTemplatePaths from the MultiFormView and later paste it in again.

     

    • Post Points: 35
  • 08-07-2008 7:45 AM In reply to

    • krs1
    • Not Ranked
    • Joined on 08-03-2008
    • Posts 2
    • Points 40

    Re: Error with .netTiers MultiFormView inside WizardStep

    Hi,

    I was v pleased to find someone else doing this also.

    How did you go about calling the insert into the database? Did you just use the existing buttons that the nettiers template provides or did you integrate it more tightly with the createuserwazard createuser method?

    All the best

    Kieran

    • Post Points: 5
Page 1 of 1 (5 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems