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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -