Free programming examples and instructions

Asp.net - Calling server side events from html Button

Demo and code for how to call server events from html button in Asp.net

by athilmp

Posted on 01 Jan 0001 Category: Asp.net Views: 22

Edited on 01 Jan 0001

Here I am going to show how to call server side events from HTML button.
By giving runat="server" onserverclick ="MyFunction" to HTML button we can call server  side events from html button


In client side

<form id="form1" runat="server">
          <input id="Submit1" runat="server" onserverclick ="MyFunction" type="submit" value="Click Me" />    

In Server Side 

public void MyFunction(object sender, EventArgs e)


Leave a Comment: