Devexpress - AspxCallbackPanel controls have no values after postback
I am having some issues with some DevExpress controls which are sitting inside an AspxCa开发者_StackOverflow社区llbackPanel. At the point of clicking the "Submit" button, everything has a value (Text boxes, combos etc) - once I check the server side code I find that everything inside my AspxCallbackPanel has lost it's value (string.empty and null), but everything outside of the AspxCallbackPanel has retained it's value.
Some wierdness with the panel I am sure - but totally has me stumped. Any ideas?
The callback panel is refreshed from a bit of javascript attached to button click events - and doesn't affect many of the values which have been cleared.
You need to use "if (!IsCallback)" in the page load to avoid the controls being altered if there is any code in the page load event so that the code is not fired in the event of a callback. Also, to ensure it's not the fault of the panel, comment out any code that is writing to the potentially cleared controls and test it. Make sure it's in more of a read-only mode to try and isolate the issue. Perhaps even create a test project with just a callbackpanel and a few simple controls and do some testing on how it works in its simplest form.
精彩评论