3
\$\begingroup\$

I haven't studied a lot about positioning of controls in ASP.NET using .Net framework 3.5 but still I know following control positioning technique isn't the best one, just to mention its a user control,

 <asp:Label ID="Label2" runat="server" Text="Number of Days"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> 

Right now I am using tabs and spaces to position controls but can I do it in a better way.

Phrancis
20.5k6 gold badges69 silver badges155 bronze badges
asked Oct 18, 2012 at 16:04
\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

Yes, use CSS and some HTML to put things where they belong. Theres is nothing special about ASP.NET controls just check the generated HTML markup on the client side.

answered Oct 18, 2012 at 16:11
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.