c# - Loading a Null String and Silverlight 4 -


i maintain silverlight 4 application. while out of office, database structure changed , table dropped , fields combined existing table. now, i’m receiving following error after create new item , proceed "summary" screen:

“value cannot null. parameter name: text @ system.windows.controls.textbox.set_text(string value)”

this happens newly created entries, not older entries information on next screen complete (data converted excel spreadsheet , loaded database). so, i’ve narrowed down this: child window used create new record doesn’t have fields added table because of information isn’t available when record created. google search turned null strings can’t passed in silverlight.

the summary screen loaded via ddssummaryloadeddata domain service. if don’t include “new” fields, values aren’t loaded existing entries, new entries don’t cause error. if include them, older entries load correctly new ones give above error.

is there workaround create empty fields until they’re needed, still load data if exists (for older entries)? or child window need redesigned? i’m new silverlight , still have learn!

it doesn't you're using bindings render view otherwise null values handled gracefully, if setting text property manually in code, use cascading operator verify not submitting null value.

mytextbox.text = mymodelvalue.firstname ?? string.empty; 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -