asp.net button onclick
<script runat="server">
void Btn_Click(Object sender, EventArgs e)
{
// When the button is clicked,
// change the button text, and disable it.
Button clickedButton = (Button)sender;
clickedButton.Text = "...button clicked...";
clickedButton.Enabled = false;
// Display the greeting label text.
GreetingLabel.Visible = true;
}
</script>
<html>
...
<asp:Button id="Button1"
Text="Click here for greeting..."
OnClick="Btn_Click"
runat="server"/>
...
</html>