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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -