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


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
 
Ad

Advertisements

A

Arne Vajhøj

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top