Style of panel control

  • Thread starter Thread starter simon
  • Start date Start date
S

simon

I have linkButton:
<asp:LinkButton CommandArgument='<%#
DataBinder.Eval(Container.DataItem,"con_ID") %>' CommandName="contact"
ID=lnkContact Runat=server><li><%#
DataBinder.Eval(Container.DataItem,"contact") %></li></asp:LinkButton>

and panel:

<asp:Panel style="position:absolute;top:100;left:100" Width=300 Height=300
Runat=server ID=pnlContact Visible=False></asp:panel>

on the page.
When user clicks this link button I show the panel:

pnlContact.visible=true

Now I would like to set the left and top parameter of panel style to be the
same as position of link button on the page.

How can I do that?

Thank you,
Simon
 
there are many ways to achieve this..

set your page to flow layout. MS_POSITIONING="FlowLayout" for the body tag.
and place the link button inside a panel. set the link button panel visible
to false and the other panel to true.

or in design mode, drag/drop link button and panel one on to other..

or set left/top positions for link button initially. and
RegisterStartupScript to get left/top positions and assign them to panel.

Av.
 
Back
Top