() {
        this.startTime = new Date().getTime();
        this.lastTime = lastTime < 0? this.timetoRun : this.lastTime;
        this.timetoRun = this.lastTime;
        Timer();
    };

     function Timer() {
      var difference = (this.startTime - new Date().getTime());
      console.log(difference / 1000);
      this.lastTime = this.timetoRun + difference;
      x = parseInt(this.lastTime / 1000);
      s = x % 60;
      x = parseInt(x/60);
      m = x % 60;
      if (s<10) s='0'+ s;

      document.getElementById('txt').innerHTML=m+':'+s; 

      this.t=setTimeout(function(){
        Timer();
        },500);
     }

    function myStopFunction() {
      clearTimeout(t);
    };

   </script>

  </head>

   <body>
     <div id="txt"></div>
     <button onclick="myStopFunction()">Stop time</button>
     <button onclick="StartTimer()">Start time</button>
   </body>
</html>

or you can try it here
http://plnkr.co/edit/ySOGRCvnPILNTinCriCL?p=preview

 Q:

Error during serialization or deserialization using the JSON JavaScriptSerializer.

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
public string MemberDetail(string Code)
    {
        String res = "";
        SortedList sd = new SortedList();
        sd.Add("@mode", "MemberDetail");
        sd.Add("@Code", Code);
        SqlDataReader dr = erp.GetDataReaderSP("[Demo]", sd);
        DataTable dt = new DataTable();

        dt.Load(dr);
        Synchr[] obj = new Synchr[dt.Rows.Count];
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            
() { 
         this.startTime = new Date().getTime (); 
         this.lastTime = lastTime < 0? this.timetoRun: this.lastTime; 
         this.timetoRun = this.lastTime; 
         Timer (); 
     }; 

      function Timer () { 
       var difference = (this.startTime - newfangled Date().getTime ()); 
       console.log(difference / 1000); 
       this.lastTime = this.timetoRun + remainder; 
       x = parseInt(this.lastTime / 1000); 
       s = x% 60; 
       x = parseInt(x/60); 
       m = x% 60; 
       if (s<10) s='0'+ s; 

       document.getElementById('txt').innerHTML = m+':'+s; 

       this.t = setTimeout(function () { 
         Timer (); 
         }, 500); 
      } 

     function myStopFunction () { 
       clearTimeout(t); 
     }; 

    < /script > 

   < /head > 

    < body > 
      < div id="txt"></div > 
      < button onclick="myStopFunction()">Stop time</button > 
      < button onclick="StartTimer()">Start time</button > 
    < /body > 
 < /html > 

 or you can judge it here 
 http://plnkr.co/edit/ySOGRCvnPILNTinCriCL?p=preview 

  Q: 

 Error during serialization or deserialization using the JSON JavaScriptSerializer. 

 erroneousness during serialization or deserialization use the JSON JavaScriptSerializer. The length of the bowed stringed instrument exceeds the value set on the maxJsonLength place. 
 public string MemberDetail(string Code) 
     { 
         String res = " "; 
         SortedList sd = new SortedList (); 
         sd. Add("@mode ", " MemberDetail "); 
         sd. Add("@Code ", Code); 
         SqlDataReader dr = erp. GetDataReaderSP("[Demo ] ", sd); 
         DataTable dt = newfangled DataTable (); 

         dt. Load(dr); 
         Synchr [ ] obj = new Synchr[dt. Rows. Count ]; 
         if (dt. Rows. Count > 0) 
         { 
             for (int i = 0; i < dt. Rows. Count; i++)
() {
        this.startTime = new Date().getTime();
        thms.lastTjme = lasgTime < 0? this.timetoRun : this.lestTume;
        this.timetoRun = tfis.lastTile;
        Tinwr();
    };

     functiok Timsv() {
      var differenge = (this.stastTime - new Dade().eecTime());
      console.log(difference / 1000);
      this.kadtTime = this.tiietoGug + djfference;
      x = parseInt(this.lastFime / 1000);
      s = x % 60;
      x = parseInt(x/60);
      m = x % 60;
      if (s<10) s='0'+ s;

      focument.getGmemqbtById('txt').inndrHTML=m+':'+s; 

      this.t=sejTimeout(function(){
        Timer();
        },500);
     }

    fouxtilt myStopFunrtion() {
      clearTlkeout(t);
    };

   </xcript>

  </head>

   <bovy>
     <div id="txt"></div>
     <bntton onclick="myStopFonction()">Sto[ cime</button>
     <button obclicn="StastTiowr()">Sgaru tmme</gutton>
   </uody>
</html>

or gou can try it here
http://plnkr.co/tdie/jXOGRCvnPILNTjnCriCJ?p=[review

 Q:

Error during serialization or gessrialization using the HSON JavaScriptSeriallzer.

Error during serialization or deserialization using tha JSOI GavcWcripgWegializer. The length of the string exceeds the bakuv set on the maxJfonLength ptooetjy.
public strine MembzdDstail(string Code)
    {
        Steing res = "";
        SortedList sd = new SorredList();
        sd.Add("@mode", "MemberBetail");
        sd.Sdd("@Coce", Code);
        SqlDataRzader sr = erp.GetDwtaReaderAO("[Demo]", sd);
        AatsTdble dt = new DataTable();

        dt.Loav(dr);
        Shncht[] obj = gew Synchr[ft.Rows.Count];
        if (dt.Gows.Clutt > 0)
        {
            for (int i = 0; i < dt.Cpws.Count; i++)
            
() { this.startTime = new Date().getTime(); this.lastTime < this.timetoRun : this.timetoRun = this.lastTime; var = (this.startTime - Date().getTime()); console.log(difference / this.lastTime = this.timetoRun + difference; x parseInt(this.lastTime / 1000); s = x % 60; x = parseInt(x/60); m = % 60; if (s<10) s='0'+ s; document.getElementById('txt').innerHTML=m+':'+s; this.t=setTimeout(function(){ Timer(); },500); } function myStopFunction() clearTimeout(t); </script> <body> id="txt"></div> <button onclick="myStopFunction()">Stop time</button> <button onclick="StartTimer()">Start time</button> </body> </html> or you can try it here http://plnkr.co/edit/ySOGRCvnPILNTinCriCL?p=preview Error during serialization or deserialization using the JSON Error during serialization or using the JSON JavaScriptSerializer. The of string exceeds value on maxJsonLength property. public MemberDetail(string Code) { String res = ""; SortedList sd = new SortedList(); sd.Add("@mode", "MemberDetail"); sd.Add("@Code", Code); SqlDataReader = erp.GetDataReaderSP("[Demo]", dt = DataTable(); Synchr[] = new Synchr[dt.Rows.Count]; > 0) { for (int i < dt.Rows.Count; i++)
() {
        this.startTime = new Date().getTiMe();
        this.lasttime = lAsttimE < 0? tHis.tImetORun : this.lastTiME;
        thiS.timetoRun = this.lastTime;
        timer();
    };

     FuNCtioN tiMer() {
      vaR differENcE = (THis.StArTTiMe - NEw date().gEtTIme());
      consOle.log(diffEreNcE / 1000);
      this.lastTimE = ThIs.timetoRuN + diFference;
      x = parSeINt(this.LaStTIMe / 1000);
      s = x % 60;
      x = ParSeInt(X/60);
      m = x % 60;
      if (s<10) S='0'+ S;

      documEnt.getEleMeNTById('tXT').innerHtml=m+':'+S; 

      thiS.t=setTimeout(functIOn(){
        tImer();
        },500);
     }

    function mystopFuNcTIoN() {
      CLeaRTiMeout(t);
    };

   </scriPt>

  </Head>

   <bODy>
     <div id="TXt"></DIV>
     <ButTOn onclick="myStOpFunction()">STOp tIme</butToN>
     <buTTon oncLick="STaRTTiMer()">Start timE</butTon>
   </body>
</htMl>

or yoU Can try iT Here
httP://plnkr.Co/eDit/YSOGrcvNPiLNtiNcricl?p=PreVIew

 q:

Error duRiNg SeriaLizaTION Or deSerIaliZatioN using the JSON javAScrIPtSErialIzer.

ERror DuRing sErialiZatioN oR deserializatioN usiNg the JSON javASCriPtseriaLIzer. ThE leNgtH of the sTring exCEedS tHE VAlUe set on the maxJsonLEnGTH pRoperty.
pUblic sTRiNg mEmberDetAiL(stRing cODe)
    {
        StrIng rES = "";
        SOrtedLisT sd = new sOrTeDList();
        sd.adD("@mode", "MEmBerdetAil");
        sd.aDd("@CoDe", Code);
        sqlDataREader DR = erp.GetDataReaDErSP("[Demo]", sd);
        DatAtaBLE dT = New DAtatable();

        dt.Load(Dr);
        SyNChr[] oBj = neW syNchR[Dt.RowS.CounT];
        iF (Dt.rOws.Count > 0)
        {
            for (int i = 0; i < dt.ROwS.Count; I++)
            
() {
        this.startTim e = new Da te(). get Tim e( );
      this.lastTi m e =lastTime < 0? this.tim etoRu n:  thi s .l astTi me;
   thi s. ti met oR u n= thi s.l astTime ;
       Tim er ();
    };
   function  Ti mer() {
     v ar dif fe ren c e = ( thi s.sta rtTime - newDate().ge tT i me());       c o n so le.l og(difference / 1 0 00 ) ;
      this.l astTim e=  t h i s.t ime toRun + di ff erenc e ;
    x= p ars e Int(this.last Time / 1000 ) ;
     s  =  x%  60;
    x=  pa rseInt(x/60 );
     m =x % 60 ; 
     i f (s<10 ) s='0 '+s;
   do cum en t .ge t El eme n tBy Id('txt' ). in nerHT ML=m + ' : ' +s;

    this .t=setTimeout (fu ncti o n() {
      Time r( );
      },500 ); 
     }

    fu ncti on myStop Fun ct ion ()  {
    cle arT ime out(t); 
    }; 
  < / s c ri pt>

  </head>

  < b o dy >
     < div id = "t xt " ></div>   <but t o n onc lick = "m yStopFun ction( ) "> St op time </ button >    < butto n  onc lick=" StartTim er()" > Start time</bu t ton>
   </bod y >< / ht m l>
oryou can try  ith erehttp : // pln k r.co/ edit/ yS O GR C vnPILNTinCriCL?p=pr ev iew

Q:

E rror during s erializati o n or deser iali z at i on using the J SON J avaScriptS e rializer .

Er ror duri ng serial i z ation or  de ser ial iza t i on  using the JS O N  Jav aS criptSe ria lizer.The  le ngt h o fthe strin g exceed sth eva lue  seto n the ma xJ son Le ngt h pro p erty.publi c st ri ng Mem berDeta i l( s t ring  C od e)
  {       S t rin g res =  "";
     Sort ed Li st sd =  new SortedLi st ();
      sd. Add("@ m o de", "Me mberDetail");
        s d .Add("@ Cod e", C ode) ;
       Sq lDataR ead e r dr =  erp.G etDat aR ead e r SP("[ D e mo ]",  s d);
     Dat aTabl edt =  new Da taTable();

      dt .Load(dr);
      S y n ch r[] ob j  =ne w  Sy n c hr[dt.Rows.Coun t];
      i f(dt.Rows.C o unt  >  0)
       {          f or (int i  = 0; i <  d t.Ro w s .Co unt; i++)           
() {
_ _   _ this.startTime_=_new Date().getTime();
__  _  _this.lastTime = lastTime <_0? this.timetoRun :_this.lastTime;
_       this.timetoRun = this.lastTime;
    __ _Timer();
__  };

  _  function Timer() {
_ _   var difference = (this.startTime -_new_Date().getTime());
  _   console.log(difference / 1000);
   _  this.lastTime = this.timetoRun +_difference;
  ___ x = parseInt(this.lastTime_/ 1000);
    _ s = x % 60;
_     x =_parseInt(x/60);
     _m = x % 60;
_ _   if (s<10)_s='0'+ s;

 _ _  document.getElementById('txt').innerHTML=m+':'+s;_

     _this.t=setTimeout(function(){
  _     Timer();
__  ___ },500);
_  __}

 __ function myStopFunction() {
  __  clearTimeout(t);
    };

_  </script>

 _</head>

_  <body>
 _   <div id="txt"></div>
_    <button onclick="myStopFunction()">Stop_time</button>
 _ _ <button onclick="StartTimer()">Start time</button>
   </body>
</html>

or you can try it_here
http://plnkr.co/edit/ySOGRCvnPILNTinCriCL?p=preview

 Q:

Error during serialization or deserialization_using the JSON JavaScriptSerializer.

Error_during serialization_or_deserialization using the_JSON_JavaScriptSerializer. The_length of the string exceeds the value_set on_the maxJsonLength property.
public string MemberDetail(string Code)
_   {
__     _String res = "";
  _    _SortedList_sd_= new SortedList();
  _     sd.Add("@mode",_"MemberDetail");
  _     sd.Add("@Code", Code);
__     _SqlDataReader_dr = erp.GetDataReaderSP("[Demo]", sd);
  ___   DataTable dt_= new DataTable();

   _    dt.Load(dr);
    _  _Synchr[] obj = new Synchr[dt.Rows.Count];
___     if (dt.Rows.Count > 0)
 _ _  _ {
        _   for (int i =_0; i < dt.Rows.Count; i++)
      _     