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

Discussion in 'ASP .Net Web Controls' started by chandan, Dec 6, 2007.

  1. chandan

    chandan Guest

    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
    chandan, Dec 6, 2007
    #1
    1. Advertising

  2. chandan

    John Padilla Guest

    RE: Is any way to palce a control(button/label) at a location on a pan

    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!
    "chandan" wrote:

    > 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
    >
    >
    John Padilla, Dec 15, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shapper
    Replies:
    2
    Views:
    731
    Scott Mitchell [MVP]
    May 7, 2005
  2. A Jozef
    Replies:
    3
    Views:
    464
    lostinspace
    Nov 26, 2003
  3. chandan
    Replies:
    3
    Views:
    462
    PJ on Development
    Dec 6, 2007
  4. Steve Amey

    Place .NET custom control on any WebPage

    Steve Amey, Oct 5, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    102
    Robert Koritnik
    Oct 5, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    265
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page