c# - Cannot perform runtime binding on a null reference -
ts mvc 4.can 1 me?!
public actionresult insertform() { try { checksession(); sessionwrapper.current.currentrn = string.empty; sessionwrapper.current.spbatteryid = -1; var servicedoc = new servicedoc(); servicedoc.idwsuser = sessionwrapper.current.securityuser.id; servicedoc.dateissued = system.datetime.now; sessionwrapper.current.currentrn = shoppingservices.insertrn(servicedoc); return view(); } catch (websessionexception) { return onwebsessionexception(); }
view:
<strong> @datetime.now</strong>
and i'am getting below error in view
microsoft.csharp.runtimebinder.runtimebinderexception: 'cannot perform runtime binding on null reference'
what can wrong!
Comments
Post a Comment