Real time delete functionality ASP NET MVC made with PUSHERPusher - Ping pong functionalityWhat is the claims in ASP .NET IdentityReal time chart using pusher and canvas jsAndroid Google Map + Pusher (real time) ListenerReal Time Fetching data with laravel5.2 , vue.js and pusherHow can I call controller post action from jquery (in custom view page) in mvc .net web apphow to display images pusher real time chatWhy solutions like pusher claim to be “Real time”?Real-time listener doesn't work in PWA with PusherReal time react web app with pusher and laravel

Multi tool use
Multi tool use

How to cope with regret and shame about not fully utilizing opportunities during PhD?

Will the volt, ampere, ohm or other electrical units change on May 20th, 2019?

Is it safe to use two single-pole breakers for a 240v circuit?

Why was my Canon Speedlite 600EX triggering other flashes?

A case where Bishop for knight isn't a good trade

Re-testing of regression test bug fixes or re-run regression tests?

Why doesn't Iron Man's action affect this person in Endgame?

Why weren't the bells paid heed to in S8E5?

Would life always name the light from their sun "white"

Acronyms in HDD specification

AMPScript Lookup From Child Business Unit

The meaning of the Middle English word “king”

What is this old US Air Force plane?

Substring join or additional table, which is faster?

How to describe a building set which is like LEGO without using the "LEGO" word?

Unexpected Netflix account registered to my Gmail address - any way it could be a hack attempt?

Single word that parallels "Recent" when discussing the near future

is it correct to say "When it started to rain, I was in the open air."

Where to find every-day healthy food near Heathrow Airport?

White foam around tubeless tires

Uh oh, the propeller fell off

Is it wrong to omit object pronouns in these sentences?

Why did the soldiers of the North disobey Jon?

Find the unknown area, x



Real time delete functionality ASP NET MVC made with PUSHER


Pusher - Ping pong functionalityWhat is the claims in ASP .NET IdentityReal time chart using pusher and canvas jsAndroid Google Map + Pusher (real time) ListenerReal Time Fetching data with laravel5.2 , vue.js and pusherHow can I call controller post action from jquery (in custom view page) in mvc .net web apphow to display images pusher real time chatWhy solutions like pusher claim to be “Real time”?Real-time listener doesn't work in PWA with PusherReal time react web app with pusher and laravel






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am trying to implement a real time comment system in ASP.NET MVC 5 made via PUSHER web socket. I want to post and delete a comment in this system.



The submit function works perfect, I followed the steps in this tutorial and everything worked fine.
(https://pusher.com/tutorials/realtime-comments-aspnet/)



The problem I have is at the delete function. First, I need to delete the comment from database(I need the commentID) and after that I need to make async to delete the comment from my webpage list(I need the index for that comment).
If i use this.splice(index,1), the function deletes the item but when I refresh the page it reapers because I cannot reach the controller function.



I know that SignalR would work great here but I want to make it with a websocket.



Can you give me some advices on how I can implement this functionality? I am trying for more than 4 days and I can't find the resolvation.



Thanks.



 public async Task<ActionResult> Delete_comment(Comment data)

Comment com1 = db.Comments.Find(data.CommentID);
db.Comments.Remove(com1);
db.SaveChanges();
var options = new PusherOptions();
options.Cluster = "eu";
var pusher = new Pusher("724721", "a3d740957cfa714c5b6e", "3e1e7ad2abc0c6ccf18f", options);
ITriggerResult result = await pusher.TriggerAsync("asp_channel", "asp_delete_event", com1);
return Content("ok");



FORM



 <form onsubmit="return false;">
<input type="hidden" id="CommentID" v-model="comment.CommentID" class="form-control" />
@Html.HttpMethodOverride(HttpVerbs.Delete)
<button class="btn" v-on:click="delete_comment()">remove </button>
</form>


DELETE SCRIPT



 listen2: function () 
my_channel.bind("asp_delete_event", (data) =>
this.comments.splice(data.index, 1);
alert("Comment Deleted2313");
)
,


delete_comment: function ()
axios.delete('@Url.Action("Delete_comment", "Comments", new , protocol: Request.Url.Scheme)', this.comment)
.then((response) =>
alert("Comment Deleted");
);
,









share|improve this question




























    0















    I am trying to implement a real time comment system in ASP.NET MVC 5 made via PUSHER web socket. I want to post and delete a comment in this system.



    The submit function works perfect, I followed the steps in this tutorial and everything worked fine.
    (https://pusher.com/tutorials/realtime-comments-aspnet/)



    The problem I have is at the delete function. First, I need to delete the comment from database(I need the commentID) and after that I need to make async to delete the comment from my webpage list(I need the index for that comment).
    If i use this.splice(index,1), the function deletes the item but when I refresh the page it reapers because I cannot reach the controller function.



    I know that SignalR would work great here but I want to make it with a websocket.



    Can you give me some advices on how I can implement this functionality? I am trying for more than 4 days and I can't find the resolvation.



    Thanks.



     public async Task<ActionResult> Delete_comment(Comment data)

    Comment com1 = db.Comments.Find(data.CommentID);
    db.Comments.Remove(com1);
    db.SaveChanges();
    var options = new PusherOptions();
    options.Cluster = "eu";
    var pusher = new Pusher("724721", "a3d740957cfa714c5b6e", "3e1e7ad2abc0c6ccf18f", options);
    ITriggerResult result = await pusher.TriggerAsync("asp_channel", "asp_delete_event", com1);
    return Content("ok");



    FORM



     <form onsubmit="return false;">
    <input type="hidden" id="CommentID" v-model="comment.CommentID" class="form-control" />
    @Html.HttpMethodOverride(HttpVerbs.Delete)
    <button class="btn" v-on:click="delete_comment()">remove </button>
    </form>


    DELETE SCRIPT



     listen2: function () 
    my_channel.bind("asp_delete_event", (data) =>
    this.comments.splice(data.index, 1);
    alert("Comment Deleted2313");
    )
    ,


    delete_comment: function ()
    axios.delete('@Url.Action("Delete_comment", "Comments", new , protocol: Request.Url.Scheme)', this.comment)
    .then((response) =>
    alert("Comment Deleted");
    );
    ,









    share|improve this question
























      0












      0








      0








      I am trying to implement a real time comment system in ASP.NET MVC 5 made via PUSHER web socket. I want to post and delete a comment in this system.



      The submit function works perfect, I followed the steps in this tutorial and everything worked fine.
      (https://pusher.com/tutorials/realtime-comments-aspnet/)



      The problem I have is at the delete function. First, I need to delete the comment from database(I need the commentID) and after that I need to make async to delete the comment from my webpage list(I need the index for that comment).
      If i use this.splice(index,1), the function deletes the item but when I refresh the page it reapers because I cannot reach the controller function.



      I know that SignalR would work great here but I want to make it with a websocket.



      Can you give me some advices on how I can implement this functionality? I am trying for more than 4 days and I can't find the resolvation.



      Thanks.



       public async Task<ActionResult> Delete_comment(Comment data)

      Comment com1 = db.Comments.Find(data.CommentID);
      db.Comments.Remove(com1);
      db.SaveChanges();
      var options = new PusherOptions();
      options.Cluster = "eu";
      var pusher = new Pusher("724721", "a3d740957cfa714c5b6e", "3e1e7ad2abc0c6ccf18f", options);
      ITriggerResult result = await pusher.TriggerAsync("asp_channel", "asp_delete_event", com1);
      return Content("ok");



      FORM



       <form onsubmit="return false;">
      <input type="hidden" id="CommentID" v-model="comment.CommentID" class="form-control" />
      @Html.HttpMethodOverride(HttpVerbs.Delete)
      <button class="btn" v-on:click="delete_comment()">remove </button>
      </form>


      DELETE SCRIPT



       listen2: function () 
      my_channel.bind("asp_delete_event", (data) =>
      this.comments.splice(data.index, 1);
      alert("Comment Deleted2313");
      )
      ,


      delete_comment: function ()
      axios.delete('@Url.Action("Delete_comment", "Comments", new , protocol: Request.Url.Scheme)', this.comment)
      .then((response) =>
      alert("Comment Deleted");
      );
      ,









      share|improve this question














      I am trying to implement a real time comment system in ASP.NET MVC 5 made via PUSHER web socket. I want to post and delete a comment in this system.



      The submit function works perfect, I followed the steps in this tutorial and everything worked fine.
      (https://pusher.com/tutorials/realtime-comments-aspnet/)



      The problem I have is at the delete function. First, I need to delete the comment from database(I need the commentID) and after that I need to make async to delete the comment from my webpage list(I need the index for that comment).
      If i use this.splice(index,1), the function deletes the item but when I refresh the page it reapers because I cannot reach the controller function.



      I know that SignalR would work great here but I want to make it with a websocket.



      Can you give me some advices on how I can implement this functionality? I am trying for more than 4 days and I can't find the resolvation.



      Thanks.



       public async Task<ActionResult> Delete_comment(Comment data)

      Comment com1 = db.Comments.Find(data.CommentID);
      db.Comments.Remove(com1);
      db.SaveChanges();
      var options = new PusherOptions();
      options.Cluster = "eu";
      var pusher = new Pusher("724721", "a3d740957cfa714c5b6e", "3e1e7ad2abc0c6ccf18f", options);
      ITriggerResult result = await pusher.TriggerAsync("asp_channel", "asp_delete_event", com1);
      return Content("ok");



      FORM



       <form onsubmit="return false;">
      <input type="hidden" id="CommentID" v-model="comment.CommentID" class="form-control" />
      @Html.HttpMethodOverride(HttpVerbs.Delete)
      <button class="btn" v-on:click="delete_comment()">remove </button>
      </form>


      DELETE SCRIPT



       listen2: function () 
      my_channel.bind("asp_delete_event", (data) =>
      this.comments.splice(data.index, 1);
      alert("Comment Deleted2313");
      )
      ,


      delete_comment: function ()
      axios.delete('@Url.Action("Delete_comment", "Comments", new , protocol: Request.Url.Scheme)', this.comment)
      .then((response) =>
      alert("Comment Deleted");
      );
      ,






      asp.net model-view-controller delete-row pusher






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 23 at 14:19









      Andrei TeodorescuAndrei Teodorescu

      11




      11






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314652%2freal-time-delete-functionality-asp-net-mvc-made-with-pusher%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314652%2freal-time-delete-functionality-asp-net-mvc-made-with-pusher%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          jPVDE,LiphFiPN8K
          zPQBVqFy3waB5RfznVx hxHcx,R1o I2i 43f0 jgsFum,bFjNh 2 Mg,tO,M4FfohD N,2 qrfGRQZg8xj

          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현