473,738 Members | 6,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:SqlDataSou rce ID="dsSpecificI nj" runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:Conn_String %>"
SelectCommand=" a valid select statement">
<SelectParamete rs>
<asp:QueryStrin gParameter Name="CINJ_ID"
QueryStringFiel d="CINJ_ID" Type="string" />
</SelectParameter s>
<InsertParamete rs>
<asp:QueryStrin gParameter QueryStringFiel d="CINJ_id"
Name="CINJ_ID" Type="String" />
<asp:SessionPar ameter SessionField="U sername"
Name="CREATED" Type="String" />
</InsertParameter s>
<UpdateParamete rs>
<asp:SessionPar ameter SessionField="U sername"
Name="UPDATED" Type="String" />
</UpdateParameter s>
</asp:SqlDataSour ce>
<asp:DetailsVie w ID="dvInjury" runat="server" Width="100%"
DataKeyNames="C INJ_ID"
DataSourceID="d sSpecificInj" DefaultMode="Re adOnly" EmptyDataText=" No
current record."
AutoGenerateRow s="false">
<FieldHeaderSty le VerticalAlign=" Top" Width="20%" Font-Bold="true" />
<FooterStyle BackColor="Alic eBlue" HorizontalAlign ="Center" />
<FooterTemplate >
<asp:Button ID="btnEdit" runat="server" Text="Edit This Injury"
CommandName="Ed it"></asp:Button>
</FooterTemplate>
<RowStyle HorizontalAlign ="Left" />
<Fields>
<asp:BoundFie ld DataField="CINJ _DT" />
</Fields>
</asp:DetailsView >

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

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

Similar topics

0
10210
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 database table, using dynamic sql. Executing 'EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp;' the error code -2149 is returned That means "Specified partition does not exist". Does anybody know if it is a database problem or a problem of
0
3637
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: "Specified cast is not valid." The only thing i put there was a "test this." inside the form. What might be the problem here? Thanks in advance. The Exception:
1
5836
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 which is an OLE Object located in the Page Header section of my .RPT file. This is the call which works perfectly in VB6 to format the crystal reports Page Header section of my report file EquipLst.rpt.
0
1508
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 get a "Specified cast not valid!" error... MyDocumentDesigner FDDesigner = ((MyDocumentDesigner)DHost.GetDesigner((IComponent)CForm));
3
3478
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 InitCombo() {
2
3091
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: try {
1
3145
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 side-by-side to the gridview and then I can click on "new" and isert a new subcategory or edit and update the sub-category. My problem is that when a category doesn't have any sub-categories then the Gridview is not displayed therefore there's no way I can...
0
1955
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 used the windows installer .msi to install PHP on a WinXP pro machine with IIS 5.1. My current problem is that when I access a test page as in http://localhost/simple.php I get the message "The specified module could not be found."
3
12435
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: ====================== Message: Specified cast is not valid. Type: System.InvalidCastException Source: System.Data.Linq TargetSite: Boolean TryCreateKeyFromValues(System.Object, V ByRef)
0
8968
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6750
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.