G
Guest
I'm converting this project from ASP.NET 1.1 to 2.0, and the thing I came
across is that my dropdownlist no returns the content of the Value property
in a correct way. I'm not using a direct Database connection or anything,
most of my dropdownlists are filled with values from static singletons that
are running or just some code that is generated at page_load.
The basic thing is that on page_load I always create a ListItemCollection
containing the items I want. The items have different content for Value and
Text. When using the debugger it is very clear that on creation my ListItems
are created as I want them. On PostBack however (the ListItemCollections are
not re-generated on postback) the ListItems in the dropdownlist contain the
same content for Value and Text (this is always the original content of
Text). So I am unable to locate the original Value these items had. YES, I
have EnableViewState set to true and NO it's not an option to re-generate the
collections after every postback. Why doesn't this normal feature work in
ASP.NET 2.0? I have tested it on 2 enviroments (local workstation and a
testserver), both indicate the same problem.
Under ASP.NET 1.1 this just works as it should.
across is that my dropdownlist no returns the content of the Value property
in a correct way. I'm not using a direct Database connection or anything,
most of my dropdownlists are filled with values from static singletons that
are running or just some code that is generated at page_load.
The basic thing is that on page_load I always create a ListItemCollection
containing the items I want. The items have different content for Value and
Text. When using the debugger it is very clear that on creation my ListItems
are created as I want them. On PostBack however (the ListItemCollections are
not re-generated on postback) the ListItems in the dropdownlist contain the
same content for Value and Text (this is always the original content of
Text). So I am unable to locate the original Value these items had. YES, I
have EnableViewState set to true and NO it's not an option to re-generate the
collections after every postback. Why doesn't this normal feature work in
ASP.NET 2.0? I have tested it on 2 enviroments (local workstation and a
testserver), both indicate the same problem.
Under ASP.NET 1.1 this just works as it should.