The click event is in javascipt. Can I make it to be in controller? I want to write in C#, not in Javascript. Here is the code for my button:
<asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="Add"
Width="112px" />
If I understand right your question, you have to use a
Formtag in your page or viaJQuery.onClick()send an ajax, post or get, to the controller and from it return a JSON with your data