How do I reposition Controls inside Panel in designer

S

schumigod

Ok, so I'm sure this is simple, but I can't find an answer...

I have placed a panel control on a web form, and placed other controls (text
box, datagrid etc...) within it, but they all snap to the left of the panel.

I am not able to drag them around inside the panel (in design view)to
position them.

My page layout is set to GridLayout.

Any help would be appreciated.
 
S

Steven Cheng[MSFT]

Hello schumigod,

As you mentioned that you use "GridLayout" for your ASP.NET web page, are
you using VS .NET 2003 and developing ASP.NET 1.1 web application? Based on
my experience, start from VS 2005, ASP.NET web page no longer adopt
gridlayout(as it doesn't quite conform to web page design best practices).

If you do use vs 2003 and use gridlayout to design ASP.NET 1.1 web page,
you can simply add the "MS_POSITIONING="GridLayout"" attribute into the
html (or asp.net container control) you want to also apply gridlayout
design. For example:

=====aspx fragment====
.....................
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">

<asp:panel id="Panel1" runat="server" .................
Width="544px" Height="456px" MS_POSITIONING="GridLayout">

Panel
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 32px; POSITION:
absolute; TOP: 32px" runat="server"
Text="Button"></asp:Button></asp:panel>



<div id="div1" style="WIDTH: 340px; POSITION: absolute; HEIGHT: 200px"
MS_POSITIONING="GridLayout">
fsdfdsfsfsff
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 24px; POSITION:
absolute; TOP: 40px" runat="server"></asp:TextBox>
</div>
</form>
</body>

..........
========================

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top