J
Jim
I have a FormView aspx page that is used for inserting and editing. By
default, the FormView is a record listing of all the elements down the
page. What I want to do is break up the record items into steps using the
Wizard.
For example, right now I have the Wizard and FormView code:
-- Start Wizard Code --
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0"
FinishDestinationPageUrl="~/ZCAdmin/ProducerList.aspx">
<WizardSteps>
<asp:WizardStep runat="server" title="Local">
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Address">
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Information">
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Final">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
-- End Wizard Code --
-- Start FormView Code --
<asp:FormView ID="FormView1" runat="server" DataKeyNames="ProducerID"
DataSourceID="sqlProducersFV">
<EditItemTemplate>
ProducerCountryID:
<asp:Label ID="ProducerCountryIDLabel" runat="server"
Text='<%# Bind("ProducerCountryID") %>' />
<br />
ProducerStateID:
<asp:Label ID="ProducerStateIDLabel" runat="server"
Text='<%# Bind("ProducerStateID") %>' />
<br />
ProducerCityID:
<asp:Label ID="ProducerCityIDLabel" runat="server"
Text='<%# Bind("ProducerCityID") %>' />
<br />
ProducerName:
<asp:Label ID="ProducerNameLabel" runat="server"
Text='<%# Bind("ProducerName") %>' />
<br />
ProducerStreetAddress:
<asp:Label ID="ProducerStreetAddressLabel" runat="server"
Text='<%# Bind("ProducerStreetAddress") %>' />
<br />
ProducerZipCode:
<asp:Label ID="ProducerZipCodeLabel" runat="server"
Text='<%# Bind("ProducerZipCode") %>' />
<br />
ProducerInfo:
<asp:Label ID="ProducerInfoLabel" runat="server"
Text='<%# Bind("ProducerInfo") %>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel"
/>
</EditItemTemplate>
-- End Form View Code --
My objective is to combine the two so it would be like the following (I know
the following code doesnt' work, but it gives an example of what I'm after):
-- Start Final Code --
<asp:FormView ID="FormView1" runat="server" DataKeyNames="ProducerID"
DataSourceID="sqlProducersFV">
<EditItemTemplate>
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0"
FinishDestinationPageUrl="~/ZCAdmin/ProducerList.aspx">
<WizardSteps>
<asp:WizardStep runat="server" title="Local">
ProducerCountryID:
<asp:Label ID="ProducerCountryIDLabel" runat="server"
Text='<%# Bind("ProducerCountryID") %>' />
<br />
ProducerStateID:
<asp:Label ID="ProducerStateIDLabel" runat="server"
Text='<%# Bind("ProducerStateID") %>' />
<br />
ProducerCityID:
<asp:Label ID="ProducerCityIDLabel" runat="server"
Text='<%# Bind("ProducerCityID") %>' />
<br />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Address">
ProducerName:
<asp:Label ID="ProducerNameLabel" runat="server"
Text='<%# Bind("ProducerName") %>' />
<br />
ProducerStreetAddress:
<asp:Label ID="ProducerStreetAddressLabel" runat="server"
Text='<%# Bind("ProducerStreetAddress") %>' />
<br />
ProducerZipCode:
<asp:Label ID="ProducerZipCodeLabel" runat="server"
Text='<%# Bind("ProducerZipCode") %>' />
<br />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Information">
ProducerInfo:
<asp:Label ID="ProducerInfoLabel" runat="server"
Text='<%# Bind("ProducerInfo") %>' />
<br />
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
<asp:LinkButton ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
</asp:FormView>
-- End Final Code --
How do I need to design my page to make FormView split up w/ a Wizard?
Thanks.
default, the FormView is a record listing of all the elements down the
page. What I want to do is break up the record items into steps using the
Wizard.
For example, right now I have the Wizard and FormView code:
-- Start Wizard Code --
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0"
FinishDestinationPageUrl="~/ZCAdmin/ProducerList.aspx">
<WizardSteps>
<asp:WizardStep runat="server" title="Local">
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Address">
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Information">
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Final">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
-- End Wizard Code --
-- Start FormView Code --
<asp:FormView ID="FormView1" runat="server" DataKeyNames="ProducerID"
DataSourceID="sqlProducersFV">
<EditItemTemplate>
ProducerCountryID:
<asp:Label ID="ProducerCountryIDLabel" runat="server"
Text='<%# Bind("ProducerCountryID") %>' />
<br />
ProducerStateID:
<asp:Label ID="ProducerStateIDLabel" runat="server"
Text='<%# Bind("ProducerStateID") %>' />
<br />
ProducerCityID:
<asp:Label ID="ProducerCityIDLabel" runat="server"
Text='<%# Bind("ProducerCityID") %>' />
<br />
ProducerName:
<asp:Label ID="ProducerNameLabel" runat="server"
Text='<%# Bind("ProducerName") %>' />
<br />
ProducerStreetAddress:
<asp:Label ID="ProducerStreetAddressLabel" runat="server"
Text='<%# Bind("ProducerStreetAddress") %>' />
<br />
ProducerZipCode:
<asp:Label ID="ProducerZipCodeLabel" runat="server"
Text='<%# Bind("ProducerZipCode") %>' />
<br />
ProducerInfo:
<asp:Label ID="ProducerInfoLabel" runat="server"
Text='<%# Bind("ProducerInfo") %>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel"
/>
</EditItemTemplate>
-- End Form View Code --
My objective is to combine the two so it would be like the following (I know
the following code doesnt' work, but it gives an example of what I'm after):
-- Start Final Code --
<asp:FormView ID="FormView1" runat="server" DataKeyNames="ProducerID"
DataSourceID="sqlProducersFV">
<EditItemTemplate>
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0"
FinishDestinationPageUrl="~/ZCAdmin/ProducerList.aspx">
<WizardSteps>
<asp:WizardStep runat="server" title="Local">
ProducerCountryID:
<asp:Label ID="ProducerCountryIDLabel" runat="server"
Text='<%# Bind("ProducerCountryID") %>' />
<br />
ProducerStateID:
<asp:Label ID="ProducerStateIDLabel" runat="server"
Text='<%# Bind("ProducerStateID") %>' />
<br />
ProducerCityID:
<asp:Label ID="ProducerCityIDLabel" runat="server"
Text='<%# Bind("ProducerCityID") %>' />
<br />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Address">
ProducerName:
<asp:Label ID="ProducerNameLabel" runat="server"
Text='<%# Bind("ProducerName") %>' />
<br />
ProducerStreetAddress:
<asp:Label ID="ProducerStreetAddressLabel" runat="server"
Text='<%# Bind("ProducerStreetAddress") %>' />
<br />
ProducerZipCode:
<asp:Label ID="ProducerZipCodeLabel" runat="server"
Text='<%# Bind("ProducerZipCode") %>' />
<br />
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Information">
ProducerInfo:
<asp:Label ID="ProducerInfoLabel" runat="server"
Text='<%# Bind("ProducerInfo") %>' />
<br />
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
<asp:LinkButton ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
</asp:FormView>
-- End Final Code --
How do I need to design my page to make FormView split up w/ a Wizard?
Thanks.