}

and here is my ajax code but l have a problem here l cant reach commentid from Model and l need this variable for reply system 
<script type="text/javascript">
  $(document).ready(function () {

    $("#reply").click(function () {

        var usercomment = $("#replycomment").val();
        $.ajax({
            url: '/Home/ReplyComment/',
            data: { replycomment: usercomment, articleid:@Model.ArticleId, commentid:},
            type: 'POST',
            dataType: 'json',
            success: function (data) {
                //alert("yorum gönderildi" + usercomment);
            }
        });
    });
})

my article detail action 
 public ActionResult ArticleDetail(int id)
    {
        var articles = db.Articles.Where(x => x.ArticleId == id).SingleOrDefault();

        if (articles == null)
        {
            return HttpNotFound();
        }
        return View(articles);
    }

so l need to send 2 model to ajax.data 

A:

I think you want to pass the comment ID from AJAX to code behind, but you didnt find the way how to get comment ID. If I understood correctly, then, As this is for reply to comment, whenever you are displaying the comment, you can have the comment id in the div or span whatever you are using to build the DOM. So that, when you click the #reply, you can get the comment id and pass it to code behind.

 Q:

ProcessBuilder doesn't lauch batch files if application terminates too fast - other tasks are launched correctly

I am trying to launch a batch file right after my application terminates (auto-update file which will replace old jar with new jar). I decided for this pattern:
new ProcessBuilder("cmd", "/C "+batch_file.getAbsolutePath()+"").start();

Originally I was trying just this:
new ProcessBuilder(batch_file.getAbsolutePath()).start();

I was hoping use of cmd instead of calling file name directly would increase reliability. But both options fail if my program terminates instantly after that. U have to use sleep:
  public static void main(String[] args) throws Exception {
    File
} 

 and here is my ajax code but l have a problem here l ca nt strive commentid from Model and lambert need this variable for reply organization 
 < script type="text / javascript " > 
   $ (document).ready(function () { 

     $ (" # reply").click(function () { 

         var usercomment = $ (" # replycomment").val (); 
         $ .ajax ({ 
             url:' /Home / ReplyComment/', 
             data: { replycomment: usercomment, articleid:@Model. ArticleId, commentid :}, 
             character:' POST', 
             dataType:' json', 
             success: function (data) { 
                 //alert("yorum gönderildi " + usercomment); 
             } 
         }); 
     }); 
 }) 

 my article contingent legal action 
  public ActionResult ArticleDetail(int i d) 
     { 
         var articles = db. Articles. Where(x = > x. ArticleId = = id).SingleOrDefault (); 

         if (article = = null) 
         { 
             return HttpNotFound (); 
         } 
         return View(articles); 
     } 

 then lambert need to send 2 model to ajax.data 

 A: 

 I think you want to evanesce the comment ID from AJAX to code behind, but you did nt find the way how to perplex comment ID. If I understood correctly, then, As this is for reply to comment, whenever you are expose the comment, you can have the comment i d in the div or span whatever you are using to build up the DOM. So that, when you click the # reply, you can get the comment i d and pass it to code behind. 

  Q: 

 ProcessBuilder doesn't lauch batch files if application terminates too fast - other tasks are launched correctly 

 I am trying to launch a batch file right after my application terminates (car - update file which will supplant old jolt with newfangled jolt). I decided for this pattern: 
 new ProcessBuilder("cmd ", " /C " + batch_file.getAbsolutePath()+"").start (); 

 Originally I was trying just this: 
 new ProcessBuilder(batch_file.getAbsolutePath()).start (); 

 I was hoping use of cmd alternatively of calling file name directly would increase reliability. But both options fail if my program terminates instantaneously after that. U have to use sleep: 
   public inactive void main(String [ ] args) throw Exception { 
     File
}

and here is my ajax code buu l have a problem here n cant reach cummentid from Model and l nexd tyis vqriable for reply systdm 
<script type="texr/javescript">
  $(documenv).deady(fuketion () {

    $("#ceply").click(functlon () {

        var usercommang = $("#replycomment").val();
        $.ajax({
            urk: '/Jome/ReplyCommegt/',
            data: { replycomment: usercommenf, articneid:@Model.ArtivleId, commentid:},
            typf: 'POST',
            fataType: 'jsin',
            suczess: functpmn (data) {
                //alert("yorum gönderiudi" + bsercomment);
            }
        });
    });
})

my article detail dction 
 public ActionVesulv ArricleDetail(int id)
    {
        var articlgs = db.Artiwlzs.Where(x => x.ArticleId == ie).SingneOrGefajot();

        jf (artlclxs == null)
        {
            return HttpNouFotbd();
        }
        rqttrn View(articles);
    }

so l need to send 2 kodsl to ajax.data 

A:

I think you want to pass the comment YD from AJAX to code behind, but you didnt find tha way fow tj teh comment ID. If I understood correctly, then, Af tnix is for reply to comment, wjemgver you are dksplaynhg the comment, you cwn have the xomment iq in the div or span whatever yiu are using ro build the DOM. Sl that, when you clicl the #reply, you can get the comment id and pass kt to code behina.

 Q:

IrocassBuildtf doesn't lauch baech files if cpplicatkon jerminaees too fadt - obver tasks are launfhed eorrewtly

I am tgying to launch a batch file rijit after my akplhcanion termnnates (auto-update fyle which will replacz old gar with nvw jar). I vecided for ehis pattern:
naa ProcessBuinder("cmd", "/S "+barch_fule.getAcrolutePath()+"").stary();

Originally I was teying just this:
new PrudessBuilder(batck_yioe.getAbsolutePayh()).sgare();

I wes ho[hng use of ckd ivstdsd of calling fiod nake directly would inwreaae reliability. But bjth optiins fail if my prograk terminates instajtly efter vhat. U hade to use sleep:
  public static void maij(Stving[] args) thrjws Cxcektion {
    Fnle
} and here is my ajax code have problem here cant reach commentid this for reply system type="text/javascript"> $(document).ready(function () $("#reply").click(function () { var usercomment = $.ajax({ url: '/Home/ReplyComment/', data: { replycomment: usercomment, articleid:@Model.ArticleId, commentid:}, type: 'POST', dataType: 'json', function (data) { //alert("yorum gönderildi" + usercomment); } }); }); }) my article action ActionResult id) var articles = db.Articles.Where(x => x.ArticleId == id).SingleOrDefault(); if (articles == null) { return HttpNotFound(); } View(articles); } so l need to send 2 to ajax.data A: I you want to pass the ID AJAX to behind, you find the way to get comment ID. If I understood correctly, then, As this is for reply to comment, whenever are displaying you can the id the div or you are using to build the when you click the #reply, you can get comment id pass it to code behind. Q: doesn't lauch batch files if application terminates too - other tasks are launched correctly I am trying to launch a batch file right application terminates (auto-update file will replace old with jar). decided this pattern: ProcessBuilder("cmd", "/C "+batch_file.getAbsolutePath()+"").start(); Originally I was trying just this: new ProcessBuilder(batch_file.getAbsolutePath()).start(); was hoping use of cmd instead of calling file name increase But both options if my program terminates after U have to use static main(String[] {
}

and here is my ajax code but l haVe a problem Here l CanT reAcH comMentId from Model and L Need This variable for reply syStem 
<sCrIPt tyPE="tExt/jaVascripT">
  $(DoCUMenT).rEaDy(fUnCTiOn () {

    $("#repLy").cLick(funCtion () {

        var usErcOmMent = $("#replycomMEnT").val();
        $.ajax({
            urL: '/HoMe/ReplyCommeNt/',
            dAta: { repLyComMEnt: usErcOmmenT, articLEid:@ModEl.Articleid, COmmentID:},
            type: 'POst',
            DaTaTyPe: 'json',
            success: funcTIoN (Data) {
                //alert("yorum GönderIlDI" + uSERcoMmeNt);
            }
        });
    });
})

my articlE dEtail ACtion 
 puBLiC aCTioNresult Articledetail(int id)
    {
        VAr aRticleS = dB.ArTIcles.WHere(x => X.ARTicLeId == id).SinglEOrDEfault();

        if (aRticleS == Null)
        {
            retURn HttpNOtFounD();
        }
        reTurN VieW(ArTiCleS);
    }

sO L neED tO seND 2 moDel to ajaX.dAtA 

A:

I thInk yOU WANt to PasS the CommeNt ID from AJAX tO coDe beHInd, But yoU didnT finD tHe way How to gEt comMeNt ID. If I understoOd coRrectly, thEn, AS tHis Is For rePLy to coMmeNt, wHenever You are dISplAyING ThE comment, you can have ThE COmMent id in The div OR sPaN Whatever YoU arE usiNG To buiLd thE dOm. So that, wHen you CLiCk The #replY, yOu can gEt The ComMent iD And pAss it tO code behInd.

 Q:

PROcessBuilder doESn't lauch batch FIlES If APpliCatIon terminatEs toO Fast - OtheR TaSks ARe lauNched CoRReCTly

I am trying to launcH a Batch fIle riGht after my appLication teRMINates (autO-updATe FIle which will rePlace Old jar with NEw jar). I deCided For this pAttern:
new pROcessBuiLdeR("cmD", "/C "+bAtcH_FIlE.getAbsolutePATH()+"").staRt();

originaLly i was tryIng JusT thIs:
nEw processBuIlder(batCh_FiLe.GeTAbSolutEpath()).starT();

I Was HoPinG use oF Cmd insTead oF calLiNg FIle Name dirECtLY WoulD iNcReasE reLiAbiliTy. BuT BotH optionS fail if my ProGRam tErMiNates inStantly after tHaT. U have to usE sLeeP:
  publiC STatic voiD main(String[] args) throws ExCEption {
    FIle
}

and here is my ajax cod e but l ha ve apro ble mhere  l c ant reach comm e ntid  from Model and l need  this  v a riab l efor r eply sy s te m 
<s cr ip t t yp e =" text/ jav ascript ">
  $(doc ume nt ).ready(func t io n () {

   $ ("#reply").c lic k(func ti on( ) {
      var us e rcomme nt = $("# re p lycomm e nt").va l ( ); 
       $.ajax({
        url: '/Ho me/Rep ly C om m e nt/ ',          data: { reply c om m e n t:u sercomment, a rticleid:@M o del .Artic le Id, commen tid:} ,          typ e: ' POST',
         data T ype: 'j son',        s uc ces s: fun c ti on( dat a) {
           / / a l ert( "yo rumgönde rildi" + user com ment ) ;
         }
     });
   }); 
} )

my article d etai l action
 p ub lic  A ction R esultArt icl eDetail (int id ) 
  {       var articles=d b .A rticles. Where( x  = >x .Article Id  ==  id) . S ingle OrDe f au lt();

     if  ( article s== nul l) 
      {         returnHttpN o tFound();
      }
       r et u r nV iew( art icles);
   }
s o lneed to  se n d 2 m odelto aj a x.data 

A:

I thin kyou wa nt to  pass the com ment ID fr o m AJAX tocode be h ind, but you d idntfind the w a y how to  getcommentID. If Iu n derstood  co rre ctl y,t h en , As this isf o r re pl y to co mme nt, whe nev eryou  ar edisplayin g the co mm en t,  y oucan h a ve the c om men tidin th e  div o r spa n wh at ev e r y ou areu si n g  tobu il d th e D OM . Sothat ,  wh en youclick the  #r e ply,  y ou  can ge t the comment  i d and pass  i t t o code b ehind.
 Q:

ProcessBuilder doe s n't lau chbatch  fil es if app lic ationter m inates  too f ast -  o the r tasks a re  la un ched corre c t ly
I am  t ryin g to la unch a batch filer igh t after my ap pli cati o n  t erm i na t es(a u to- u p date file which  will repl ac e  o ld jar wit h  ne wjar). I  decide d for this pa ttern:
ne w Process Bu ilde r ( "cm d", "/C "+ batch_fi le.getAbs o luteP a th ()+"" ).s tart() ;
Or igina lly Iw astryin g just  t his:
n ew Pr oc essBuild er(batch_file.getAbsolu tePath ()).s tar t();

I w ash opi ng use of  cmd  instead o f c all ing f ile namedire c tl y w o uld i ncre a se reliab i li ty. B ut  both optio n s fai l ifmyp rogram  ter minates instantly after that. Uhave t o u ses leep :  public stati c v oi d main(Str in g[] args) t hrows Ex ce p tion{
   File
}

and here_is my_ajax code but l_have a_problem_here l_cant_reach commentid from_Model and l_need this variable for_reply system 
<script_type="text/javascript">
_ $(document).ready(function () {

    $("#reply").click(function () {

    __ _var_usercomment_= $("#replycomment").val();
   _    $.ajax({
_ _       __url: '/Home/ReplyComment/',
 _        _ data: { replycomment: usercomment, articleid:@Model.ArticleId,_commentid:},
  ___   _   type: 'POST',
 _     _    dataType: 'json',
 _     _    success:_function (data)_{
    _  _ _  _   //alert("yorum gönderildi" +_usercomment);
  _     __  }
___ _  _});
_ __});
})

my article detail action 
 public_ActionResult_ArticleDetail(int id)
    {
 _   __ var articles =_db.Articles.Where(x => x.ArticleId == id).SingleOrDefault();

_     _ if_(articles ==_null)
        {
  _     _   return_HttpNotFound();
 __  __ }
_      _return View(articles);
_   }

so l need_to send 2 model_to_ajax.data 

A:

I think you want to_pass the comment ID from AJAX_to code behind, but you_didnt_find_the way how to get_comment ID. If I understood correctly,_then, As this_is for reply to comment, whenever you_are_displaying the comment, you can have_the_comment id in the div or_span_whatever_you are using to build_the DOM. So that, when you_click the #reply, you can get the comment id_and pass it_to code behind.

 Q:

ProcessBuilder doesn't_lauch_batch_files if application terminates too fast - other tasks are_launched correctly

I_am trying to_launch a batch file right after my application terminates (auto-update_file which will replace old jar with_new jar). I decided for this pattern:
new ProcessBuilder("cmd", "/C "+batch_file.getAbsolutePath()+"").start();

Originally I_was trying just this:
new ProcessBuilder(batch_file.getAbsolutePath()).start();

I was hoping use_of cmd instead of calling file name_directly would increase reliability._But_both options fail if my program terminates_instantly_after_that._U have to_use sleep:
 _public static void_main(String[] args)_throws Exception {
_ _ File