473,378 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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.

Nov 8 '06 #1
0 1124

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bas Paap | last post by:
I'm having a problem with formviews and DropDownLists in ASP.NET 2.0. I'm using a formview to insert an order into a database. Part of the order is the customer. Currently, I have a dropdownlist...
4
by: Rob | last post by:
Hey all, So.. a simple FormView/SqlDataSource to handle inserting records into a table. The table has a primary key that the user enters (eg DiscountCode). If the user enters a duplicate the...
2
by: sck10 | last post by:
Hello, I have a LinkButton that I use to open a FormView in ReadOnly mode "ShowList", and a LinkButton to open the same FormView in the Insert mode "NewRecord". If the user clicks "ShowList"...
0
by: Hawk | last post by:
Hello, this is my first post hope to get some good answers. I am using asp.net 2.0 and I am trying to pass the value entered in the formview textbox in insert mode "in this case it is the...
1
by: scartin | last post by:
I'm fairly new to working with ASP web controls, and am running into what seems to be a ridiculous problem that I'm hoping will be a breeze for an experienced ASP developer. I have a GridView...
2
by: Ned Balzer | last post by:
I'm trying to create a formview bound to a sqldatasource, and use a stored procedure to insert data from the formview into several tables. I have some simplified code below, the real code is much...
2
by: sck10 | last post by:
Hello, I have 3 objects: LinkButton GridView FormView The LinkButton is used to open the FormView in Insert mode. The GridView provides a list of products. When the "Select" link is
0
by: =?Utf-8?B?UGF1bCBCdXp6YSwgb2xkc3RlciB1c2luZyBuZXcg | last post by:
I'm trying to retrieve the @@identity value of the just-inserted record using a FormView control on an .aspx page. Here's what I have tried..... --change in-line Insert in the SqlDataSource from...
1
by: andy | last post by:
I have several forms with formviewa on them. When a new record is inserted the users want to see the readonly version of that record. Default behaviour is to show the first record in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.