Is any way to palce a control(button/label) at a location on a panelin a webPage ASP.net 2.0in run

C

chandan

Hi,
Is any way to palce a control(button/label) at a location on a panel
in a webPage in runtime??



I am trying to place a control at mouse click position on the a panel
in a
page.also I am not getting the mouse down position on the panel ,I am
working on that.Actually I am windows Programmer and all those things
are done in windows very smoothly.


Let me know if any solution!! send me some link for sample for this
problem


Cheers,
Chandan Kumar
 
J

John Padilla

There sure is.

you need to decide when you want to add something to the panel (an event)

insid the event you do this:

say your panel's ID = myPanel

string[] count = new string[2];
count[0] = "btOne";
count[1] = "btTwo";

myPanel.Controls.Add((new TextBox()).ID = count[0]);
myPanel.Controls.Add((new TextBox()).ID = count[1])

You can add any type of control at run time this way that you can do at
designtime.

Hope this helps!
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top