Professional Documents
Culture Documents
net control
Both client side and server side and script both client side and server side
asp.net control
html control
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script runat="server">
void disp(object oo,EventArgs ee)
{
Response.Write("html button at server side with c# method");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" value="ok" runat="server" onserverclick="disp" />
</div>
</form>
</body>
</html>
Webcontrol
System.web.ui.webcontrol
Button tagname as class name with properties(text,forecolor,backcolore,height,title and others) and events(onclick and
others)
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script runat="server">
void abc(object oo,EventArgs eee)
{
Response.Write("hello");
}
</script>
<script>
function abc() {
alert('client');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btn" runat="server" Text="ok" OnClick="abc" />
<asp:Button ID="btn2" runat="server" Text="ok1" OnClientClick="abc();" />
</div>
</form>
</body>
</html>