c# - RadioButtonList and TextBox not updating in FormView -



c# - RadioButtonList and TextBox not updating in FormView -

i have asp.net 4.0 formview bound sqldatasource, using sql server 2008. opens in edit mode default, , binding , updating working fine until today when added 1 more radiobuttonlist , textbox it. new radiobuttonlist , textbox display info correctly, when update, info doesn't added database. else still works before. i'm sure i'm doing dumb, i'm under time crunch , don't see it. love post html, in code blocks, every time seek submit question, error message ("an error has occurred). so, here's can tell you: there more 1 radiobuttonlist on page, , more 1 textbox. radiobuttonlists , textboxes on page before today work fine. display info database, , save info database. new radiobuttonlist different in has onselectedindexchanged event, causes new textbox value change. new textbox uses formatting display date mm/dd/yyyy, unlike other textboxes display info straight database. other that, can't see differences.

here's code behind (rblcomplete , tbdatecompleted new controls; fvempinfo formview):

using system; using system.collections.generic; using system.data; using system.linq; using system.web; using system.web.ui; using system.web.ui.webcontrols;</code> namespace eas.telecom { public partial class newrolloutdetails : system.web.ui.page { protected void page_load(object sender, eventargs e) { } protected void updateformview(object sender, formviewupdatedeventargs e) { fvempinfo.databind(); lbresult.visible = true; } protected void setdatecompleted(object sender, eventargs e) { foreach (control command in fvempinfo.controls) { radiobuttonlist rblcompleted = (radiobuttonlist)control.findcontrol("rblcomplete"); textbox tbdatecompleted = (textbox)control.findcontrol("tbdatecompleted"); if (rblcompleted.selectedvalue == "true") tbdatecompleted.text = datetime.today.toshortdatestring(); else tbdatecompleted.text = ""; } } } }

man, face red. knew dumb. hadn't added 2 new fields sqldatasource's update command. please pay me no mind....

c# asp.net data-binding formview

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -