I'm confused and need some help.
My company is creating some web parts that will go into a portal we have developed, however these parts will also be "sold seperately" and should be able to work in any portal that uses web parts. So we inherit from a web part base class, and everything is generated dynamically from there, i.e.:
Button b = new Button();
b.Text = "Submit";
this.Controls.Add(b);
Ok, so every web part we make has a LinkButton that says, "Help", and when you click on it, we want to display a floating, draggable panel with some help text on it. The drag panel seems perfect in this regard.
The thing is, since these web parts must be able to work in any given portal, I can't ensure that there will be a existing, hidden panel and/or a Drag Panel already setup and ready for use on the web page. I need to create it dynamically. So I need to do something like this:
Panel p = new Panel();
p.ID = "Panel1";
// Add some help text or whatever to the panel here
DragPanelProperties dpp = new DragPanelProperties();
dpp.TargetControlID = p.ID;
dpp.DragHandleID = p.ID;
Page.Controls.Add(p);
This isn't working at all. TargetControlID doesn't even show up in intellisense, and doesn't compile. I assume I need a dragpanelextender as well, but I that has no properties either, and won't compile.
How can I 100% dynamically generate a drag panel? Or can't I?