Formview with no select, insert only mode and via a stored procedure.. Possible????

J

jobs

I presumed you could do this.. and so I coded it up .. but I get this
error:

DataBinding: 'System.Data.DataRowView' does not contain a property
with the name 'iProductCode'

<asp:FormView ID="RouteFormView" runat="server"
DataSourceID="DestandRouteInsertSource"

DefaultMode="Insert" SkinID="FormView" BorderColor="Transparent"
BackColor="Transparent"

GridLines="Both">

<InsertItemTemplate>

<table>

<tr>

<td>

<asp:Label ID="iProductCodeLabel" runat="server"
Text="iProductCode:"></asp:Label></td>

<td>

<asp:DropDownList ID="iProductCodeList" runat="server"
DataValueField="iProductCode"

DataTextField="iProductCode" SelectedValue='<%# Bind("iProductCode")
%>' DataSourceID="iProductCodesource">

</asp:DropDownList><br />

</td>

</tr>

.... continues



the source:

<asp:SqlDataSource ID="DestandRouteInsertSource" runat="server"
ConnectionString="<%$ ConnectionStrings:RTEConnectionString %>"

InsertCommand="GEN_ADM_CreateDestandRoutes_sp"
InsertCommandType="StoredProcedure">

<InsertParameters>

<asp:parameter Name="iDestCode" Type="string" />

<asp:parameter Name="iProductCode" Type="string" />

<asp:parameter Name="iLocationType" Type="string" />

<asp:parameter Name="iDestMainArea" Type="string" />


.... continues

Please say it isn't so.



Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top