Error in call to base.OnPreRender(e) in ApplicationBasepage.cs


Author
Message
Marcia G Akins
Marcia G Akins
StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Hi All.

I am working my little heart out on a prototype using the web sample app. I have the search page up and running and am working on the edit page. After I clcik on Undo, I get this error:

[ArgumentOutOfRangeException: 'ddlOwner' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value]
   System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) +8548181


Now, I understand what the error means. However, I also have a drop down list that contains owners from the users table. On the seach page, the owner shows up in the listview with a value that is theoretically in the users table (Anyway, it looks that way when I look at the data in SQL Server). When the Edit page comes up, the slected value in the owners drop down list is blank, even though I can see the correct value in the control's list.

I have a similar problem with some other drop down lists on this page - same sort of error, same line of code. However, these drop down lists show up with the correct selected value when I first navigate to the edit page.

Any idea on what is going on here? I have a feeling that it must be something simple, but I haven't done much web programming and could really use some help.

TIA.

-- Marcia
Reply
Marcia G Akins
Marcia G Akins
StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)StrataFrame User (434 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Gerard O Carroll (10/28/2011)
In the past, on some lookup type tables, I was getting inconsistent results if I had a table with a VarChar. If I chenge it to Char , seemd to fix it, I assum it was something in the VarChar to do with trailing spaces. It might be worth a try


Thanks for trying to help. That problem was solved a few hours agao. I was just wondering if there was an easy was to populate the drop down lists so that they would automagically right trim the items and act like they were case insensitive.

If there is no EASY way, I am not really interested Smile

Have a great weekend!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search