473,320 Members | 1,838 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,320 software developers and data experts.

DetailsView "specified argument..."

I have a DetailsView which is inside of a FormView. I lifted this
DetailsView straight off another one of my pages, where it was working
beautifully. Now I get this endlessly frustrating error message
whenever I try to go into Edit mode:

Specified argument was out of the range of valid values.
Parameter name: index

The DetailsView is actually inside an UpdatePanel, which is inside an
Ajax Accordion, which is inside the FormView. Could possibly be this,
but my Insert and my ReadOnly templates work perfectly.

I started stripping it down (it was pretty complex) but I have the
same results. Here's the code for my DetailsView and my SqlDataSource.
I took everything out of my DetailsView except for the Edit button and
1 field. Like I said, both other templates work fine:

<asp:SqlDataSource ID="dsSpecificInj" runat="server"
ConnectionString="<%$ ConnectionStrings:Conn_String %>"
SelectCommand="a valid select statement">
<SelectParameters>
<asp:QueryStringParameter Name="CINJ_ID"
QueryStringField="CINJ_ID" Type="string" />
</SelectParameters>
<InsertParameters>
<asp:QueryStringParameter QueryStringField="CINJ_id"
Name="CINJ_ID" Type="String" />
<asp:SessionParameter SessionField="Username"
Name="CREATED" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter SessionField="Username"
Name="UPDATED" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:DetailsView ID="dvInjury" runat="server" Width="100%"
DataKeyNames="CINJ_ID"
DataSourceID="dsSpecificInj" DefaultMode="ReadOnly" EmptyDataText="No
current record."
AutoGenerateRows="false">
<FieldHeaderStyle VerticalAlign="Top" Width="20%" Font-Bold="true" />
<FooterStyle BackColor="AliceBlue" HorizontalAlign="Center" />
<FooterTemplate>
<asp:Button ID="btnEdit" runat="server" Text="Edit This Injury"
CommandName="Edit"></asp:Button>
</FooterTemplate>
<RowStyle HorizontalAlign="Left" />
<Fields>
<asp:BoundField DataField="CINJ_DT" />
</Fields>
</asp:DetailsView>

Any help would be appreciated.
Dec 6 '07 #1
0 1509

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

Similar topics

0
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the...
0
by: Tao | last post by:
I just upgraded .NET framework to 1.1 and VS.Net to 2003 version and tried to test it out. I created an ASP.NET project using the wizard and tried to run it by hitting "F5". I got an exception:...
1
by: Ron Holmes | last post by:
I posted this question on the Crystal Reports Support site and I am still waiting for an answer. Using Crystal Reports 9.0 Developer Full edition: My Crystal report .RPT file has a Picture box...
0
by: Özden Irmak | last post by:
Hello, In my application, I've to cast DocumentDesigner class to my own derived class,MyDocumentDesigner, in order to reach the protected properties in DocumentDesigner class. But everytime I...
3
by: Michael Conroy | last post by:
Hi... Synposis... Throws exception: "Specified argument was out of the range of valid values." Read on for the juicy tidbits. MySimpleClassCol mscc=new MySimpleClassCol(); private void...
2
by: Fabian | last post by:
Hi, I work with asp.net 2.0 and I have a intermittent error, only happens a few times a day. In the page I evaluate a Query String and then I get data form a database. The code snipped: ...
1
by: Giorgio | last post by:
Hi, I have a dropdown menu with categories and when a category is selected the Gridview is binded with sub-categories. Then when a sub-category is selected a detailsview is displayed...
0
by: RCM | last post by:
I am really eager to quit the Microsoft world and get into LAMP. For the immediate future I can't do the Apache part, so I am at least trying to get PHP up and running under IIS to learn it. I...
3
by: =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post by:
I'm attempting to use LINQ to insert a record into a child table and I'm receiving a "Specified cast is not valid" error that has something to do w/ the keys involved. The stack trace is: ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.