View Complete Post
On my formview I have a drop down list that is populated with the names of the files in a certain directory. This works fine, but when the drop down list selected value is bound to the database field I get the following error :
'ImageFileDropDownList' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value
I have setup other drop down lists in the same formview populated from SqlDataSources and these all work fine. I can see perhaps why this is an issue because I have not specified a DataValueField or a DataTextField for this drop down that is populated in code (whereas I can for the SQL bound ones) because I'm not sure what these settings would be.
I need to have a "blank" option as well so that the field does not default to the first value in the list.
My code (I have stripped out some meaningless controls) :
<asp:FormView ID="FormView1" runat="server" DataKeyNames="BannerID" DataSourceID="SqlDataSource2" OnItemDeleted="FormView1_ItemDeleted">
<table width="100%" cellspacing="0" cellpadding="4">
A thread somewhat simliar to this has been posted before as well, but i just wanted to detail out the issue and circumstances
We have a list with 53 columns and 2600 items(and growing. I know its rubbish, but thats the way it is at the moment). The list was created using SharePoint GUI on a test server, saved as a template with data, and was then imported to the production
environment. I can post the list columns and type if it helps.
Every one in a while, on updating an item, SharePoint throws up the very not so helpful error page with "Exception from HRESULT: 0x80040E2F".
We looked into the logs and found that for each suc error, there was a Database level error logged as well.
The error starts with Unexpected query execution failure, error code 3621. Additional error information from SQL Server is included below. "The statement has been terminated." Query text (if available): "BEGIN TRAN;DECLARE... and runs for many lines so i
wont post the entire blurb here.
Each time, the item update is successful, despite this error. The list also has an Item Updated event handler attached to it. Every time the update error occurs, the event handler does not seem to be firing.
Anybody can shed light on what is happening. We have tried exporting the list template to another site and everything seemed to work
The dropdown may be binded with a datasource or have same value list.
I have asp.net2.0 framework.
Please don't advise for using ajax.
Please reply as soon as possible.
I want to access some fields from my formview insertmode. I am in the code behind and it will not allow me to see them....