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
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;
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
add a comment |
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
add a comment |
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
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
asp.net model-view-controller delete-row pusher
asked Mar 23 at 14:19
Andrei TeodorescuAndrei Teodorescu
11
11
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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