How to call server side code from javascript in asp.net?
<p>I have <code>Repeater control</code> like this;</p>

<pre><code>&lt;asp:Repeater ID="repeaterCategoryList" runat="server" 
                onitemcommand="repeaterCategoryList_ItemCommand"&gt;
                &lt;ItemTemplate&gt;
                        &lt;td class="center"&gt;
                            &lt;asp:Button ID="buttonDelete" runat="server" CssClass="btn btn-primary" CommandName="Delete" Text="Delete" 
                                CommandArgument='&lt;%# Eval("CategoryId") %&gt;'/&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:Repeater&gt;
</code></pre>

<p>And my code behind page looks like this;</p>

<pre><code>protected void repeaterCategoryList_ItemCommand(object source, RepeaterCommandEventArgs e)
{
    if (e.CommandName == "Delete")
    {
         //my server side logic here
    }
}
</code></pre>

<p>And my javascript code in .aspx file looks like this:</p>

<pre><code>&lt;script&gt;
    $(function () {
        $('#buttonDelete').live('click', function (e) {
            e.preventDefault();
            $.alert({
                type: 'confirm'
                , title: 'Alert'
                , text: '&lt;p&gt;Are you sure, you want to delete this category&lt;/p&gt;'
                , callback: function () {

                    // call server side here
                }
            });
        });

    });
&lt;/script&gt;
</code></pre>

<p><strong>How do I call the repeater delete command logic inside my javascrpt?
Is there any alternative way to do this?</strong></p>
