Home All Groups Group Topic Archive Search About

Positioning Panel on WebForm at runtime

Author
20 May 2005 9:00 PM
Andrew Rayner via .NET 247
hi all,

What I am attempting to do is at run time create a panel add a link button to it, and then I am trying to place it at a specific position on the webform.  I am trying to do this to create a tree of panels on the form, but to do this I need to be able to set the position at run time being that new objects will be added when the webform is running.  So far I have been able to create the panel set it's size (hieght and width) place the link inside and display it inside of a placeholder.  But try as I might I can not figure out a way to place the label on the webform were I want it to be placed.  Any help with this will be greatly appreacated.

--------------------------------
From: Andrew Rayner, OOSD

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>btpzoMKG1kCFeD7mv4Q1ZQ==</Id>

Author
21 May 2005 5:03 AM
Steve Goodyear
Hi Andrew,

You can control this through the Style property:
Panel1.Style["position"] = "absolute";
Panel1.Style["left"] = "400px";
Panel1.Style["top"] = "100px";

Cheers,
Steve Goodyear