In this article we will introduce with HTML Button control in ASP.NET using C#.
HTML Button Example in Asp.net
HTML Button using in Asp.net Toolbox Controls using through HTML Tab. Button be drag in Asp.net Button.aspx page .in this Example we can Take a Text field that show the before event : 'Question'. and after button event fired then texfield show the result: 'Answer'.
Button.aspx (Design Page):

Button.aspx (source code):
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Button.aspx.cs" Inherits="Button" %>
<asp:Content ID="Content2" runat="server"
contentplaceholderid="ContentPlaceHolder1">
<script runat="server" language="C#" >
protected void MySubmitHandler(object o, EventArgs e) {
inputText.Value = "Answer";
}
</script>
<div>
<h2><strong>Button.aspx:</strong></h2></div>
<div>
<input id="Submit1" type="submit" runat="server" value="Result"
onServerClick="MySubmitHandler"/>
<input id="inputText" type="text" runat="server" value="Question" /></div>
</asp:Content>
Output:


[ 0 ] Comments