T
Tony Johansson
Hello!
Here I have a HTML document.
I just wonder if it's correct to say that the div element in this document
is also a control.
My definition is that the div is of course an element but not a control.
I would say that a control is only those that has a visual appearance on the
form like table,TextBox, Label and so on.
Is this a correct interpretation ?
%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>My example</title>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 154px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="style1">
<tr>
<td class="style2"> Chose a color </td>
<td>
<input runat="server" id="btnRed" type="button" value="Red"
style="background-color: #FF0000; Width: 80px"
onserverclick="btnRed_ServerClick" />
<input runat="server" id="btnGreen" type="button"
value="Green" style="background-color: #00FF00; width: 80px;"
onserverclick="btnGreen_ServerClick" />
<input runat="server" id="btnBlue" type="button"
value="Blue" style="width: 80px; background-color: #0000FF;"
onserverclick="btnBlue_ServerClick" />
</td>
</tr>
<tr>
<td class="style2"> </td>
<td>
<div runat="server" id="DIV1"></div>
</td>
</tr>
</table>
</form>
</body>
</html>
//tony
Here I have a HTML document.
I just wonder if it's correct to say that the div element in this document
is also a control.
My definition is that the div is of course an element but not a control.
I would say that a control is only those that has a visual appearance on the
form like table,TextBox, Label and so on.
Is this a correct interpretation ?
%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>My example</title>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 154px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="style1">
<tr>
<td class="style2"> Chose a color </td>
<td>
<input runat="server" id="btnRed" type="button" value="Red"
style="background-color: #FF0000; Width: 80px"
onserverclick="btnRed_ServerClick" />
<input runat="server" id="btnGreen" type="button"
value="Green" style="background-color: #00FF00; width: 80px;"
onserverclick="btnGreen_ServerClick" />
<input runat="server" id="btnBlue" type="button"
value="Blue" style="width: 80px; background-color: #0000FF;"
onserverclick="btnBlue_ServerClick" />
</td>
</tr>
<tr>
<td class="style2"> </td>
<td>
<div runat="server" id="DIV1"></div>
</td>
</tr>
</table>
</form>
</body>
</html>
//tony