0 Comments

If you want to do a postback from javascript with ASP .NET AJAX and the aspx page contains a

<form id="mainForm" runat="server">

, you can create and use the javascript function to do a postback from javascript:



function
DoPostBack() {

    var form = document.getElementById(‘mainForm’);

    form.submit();

}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.