Page postback on asp.net?

In my application, I have a playvideo page where the video will be played, below I have an option for sharing videos, for example, adding to favorites, playlist and sending mail. when I click on any link, the page sends back and the video starts from the first. I put an update panel for the link button, even if it doesn’t work (the video plays from the first, that is, the page - postback). Maybe help me. thank

+3
source share
3 answers

Actually, the part of the page that is in UpdatePanelperforms a postback. Make sure that you have only those controls (like your links) inside UpdatePanel.

UpdatePanel s; , . , UpdatePanel , UpdatePanel , ; , , UpdateMode Conditional YourDesiredUpdatePanel.Update() - .

Btw,

. XMLHTTP, Microsoft AJAX, , IE.

+2

, , .

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

, , , return false javascript onclick .

, asp, , :

<asp:Button ID="myButton" runat="server" OnClientClick="DoThingsInJavascript(); return false;" />

, , :

<input type="button" onclick="DoThingsInJavascript(); return false;" />
+2

I never liked the update panel, and I sometimes found that this behavior is terrible. Have you thought to try something like ajax call from Javascript

0
source

Source: https://habr.com/ru/post/1736435/


All Articles