Positioning Panel on WebForm at runtime

  • Thread starter Andrew Rayner via .NET 247
  • Start date
A

Andrew Rayner via .NET 247

hi all,

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

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
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top