d2fox
asked on
How to dynamically position a panel
In the below, I would like the Panel, pnlChoice, to show directly after the content in DateTimeLabel2. The issue that I have is that the content in DateTimeLable2 can vary in length, so I need to somehow dynamically position the panel.
thanks
thanks
<asp:UpdatePanel runat="server" id="UpdatePanel2">
<ContentTemplate>
<div style=" border-style:solid; border-width:1px;"><div style=" background-color:#f5f8fa; border-style:solid;
border-color:#f5f8fa;
border-width:30px;">
<div><asp:Label runat="server" id="DateTimeLabel2" /></div>
<asp:Panel ID="pnlChoice" runat="server">
</asp:Panel> <br /></div></div><br />
<p style="display:none" id="para">jjj</p>
<asp:Button runat="server" id="UpdateButton2" OnClientClick="SendForm()" onclick="UpdateButton_Click" text="Update" Style="background-image: url(images/imagebutton.png); background-repeat: no-repeat; font-size:medium; color:White" BackColor="Transparent"
BorderStyle="None" ClientIDMode="Static" ForeColor="Transparent" Height="41px" Width="101px" />
<asp:Button ID="btncontinue" runat="server" Text="SUBMIT"
Style="background-image: url(images/imagebutton.png); background-repeat: no-repeat; font-size:medium; color:White" BackColor="Transparent"
BorderStyle="None" ForeColor="Transparent" Height="41px" Width="101px"
Visible="False" onclick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good Idea for this is assign the position of the panel like this
pnlChoice.y = DateTimeLable2.Length+10;
This will work fine
regards
Ramki