Let me preface this with I didn't create this nightmare.
Page Setup:
There is a custom object data source which is used to "collect" all the bound field values, and place the values in SESSION, so that they can be put in an XML document on a downstream page.
There are separate Edit/Insert item templates, which are basically the same control.
There are SQL data sources within the templates to load drop downs.
I cannot change the architecture of the site as it is out of scope.
I have added a "empty" row to both drop downs for the initial page load.
Problem:
DropDown 1 works all the time with
SelectedValue='<%# Bind("sessionValue1") %>'
DropDown 2 works in the "Insert" mode with
SelectedItem='<%# Bind("sessionValue2") %>'
DropDown 2 throws a "ListItem Not Serializable" when I RETURN to the page and it's in EDIT mode, using SelectedItem
DropDown 2 throws a "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." when I use SelectedValue instead of SelectedItem on postback, but not on initial load.
Thanks in advance,
Lodlaiden
You've got questions and source code. We want both!
Page Setup:
There is a custom object data source which is used to "collect" all the bound field values, and place the values in SESSION, so that they can be put in an XML document on a downstream page.
There are separate Edit/Insert item templates, which are basically the same control.
There are SQL data sources within the templates to load drop downs.
I cannot change the architecture of the site as it is out of scope.
I have added a "empty" row to both drop downs for the initial page load.
Problem:
DropDown 1 works all the time with
SelectedValue='<%# Bind("sessionValue1") %>'
DropDown 2 works in the "Insert" mode with
SelectedItem='<%# Bind("sessionValue2") %>'
DropDown 2 throws a "ListItem Not Serializable" when I RETURN to the page and it's in EDIT mode, using SelectedItem
DropDown 2 throws a "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." when I use SelectedValue instead of SelectedItem on postback, but not on initial load.
Thanks in advance,
Lodlaiden
You've got questions and source code. We want both!