M
MarcG
I want to use a asp.net wizard control to help the user enter fields for a
single complex record. The idea is for each page to solicit data for a subset
of the fields and at the end do the update.
The wizard has a DataBind method, but I can't find a way to associate the
SqlDataSource on the page with the wizard control itself.
In the aspx I have...
<asp:Wizard ID="surveyDescrWizard" runat="server" Width="800px">
.....
<WizardSteps>
<asp:WizardStep runat="server" Title="Page 2">
Title:
<asp:Literal ID="Literal1" runat="server"
Text="LiteralText"></asp:Literal>
<asp:TextBox ID="TextBox1" runat="server"
BorderStyle="Double" Text='<%# Bind("Title") %>'></asp:TextBox>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ...>
....
</asp:SqlDataSource>
In my page load event I have...
if (!IsPostBack)
{
surveyDescrWizard.DataBind();
}
I get the exception ...
"Databinding methods such as Eval(), XPath(), and Bind() can only be used
in the context of a databound control."
On reflection (so to speak) this makes perfect sense since there is no
property or method that lets you associate the datasource with the wizard
itself.
Since the Wizard control offers a DataBind() method, there must be some way
to do this, but I just can't see it.
Thx
Marc
single complex record. The idea is for each page to solicit data for a subset
of the fields and at the end do the update.
The wizard has a DataBind method, but I can't find a way to associate the
SqlDataSource on the page with the wizard control itself.
In the aspx I have...
<asp:Wizard ID="surveyDescrWizard" runat="server" Width="800px">
.....
<WizardSteps>
<asp:WizardStep runat="server" Title="Page 2">
Title:
<asp:Literal ID="Literal1" runat="server"
Text="LiteralText"></asp:Literal>
<asp:TextBox ID="TextBox1" runat="server"
BorderStyle="Double" Text='<%# Bind("Title") %>'></asp:TextBox>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ...>
....
</asp:SqlDataSource>
In my page load event I have...
if (!IsPostBack)
{
surveyDescrWizard.DataBind();
}
I get the exception ...
"Databinding methods such as Eval(), XPath(), and Bind() can only be used
in the context of a databound control."
On reflection (so to speak) this makes perfect sense since there is no
property or method that lets you associate the datasource with the wizard
itself.
Since the Wizard control offers a DataBind() method, there must be some way
to do this, but I just can't see it.
Thx
Marc