Is there any guideline in what section in aspx page where I should put my controls

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

If I add a new aspx page in the solution explorer it looks like the one
below.
So I just wonder if there exist any guideline in what element section I
should put my controls.?
For example should all control be put within the form element section and
perhaps also within the div section
it's these kind of things I would like to know.

<<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs"
Inherits="Default2" %>

<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>

//Tony
 
If I add a new aspx page in the solution explorer it looks like the one
below.
So I just wonder if there exist any guideline in what element section I
should put my controls.?
For example should all control be put within the form element section and
perhaps also within the div section
it's these kind of things I would like to know.

<<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs"
Inherits="Default2" %>

<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>

What controls?

Those related to the form should obviously be within the form.

Whether they should be within the div or not depends on where
you want them layout wise.

Arne
 
Back
Top