Html – change position panel

asp.netcsshtmlstylesheet

<table> 
  <tr><td>  
     <asp:Panel ID="PanelButtomEnter" runat="server" >
      </asp:Panel>
  </tr></td>
</table>

 protected void brtnEnterProduct_Click(object sender, EventArgs e)
 {
    //how can change position panel
 }

how can change position panel on page.

Best Solution

First, you have </tr></td> but it should be </td></tr>.

Second, while applying style.top and style.left, you should also apply style.position="absolute", like this:

this.PanelButtomEnter.Style.Add("position","absolute");
this.PanelButtomEnter.Style.Add("top","100px");
this.PanelButtomEnter.Style.Add("left","100px");

These 3 values should work.

I hope this helps.

See following MSDN articles.

WebControl.Style Property

CssStyleCollection.Add Method