Button Click Event into dynamic UserControl

Discussion in 'ASP .Net' started by Luca, Mar 25, 2005.

  1. Luca

    Luca Guest

    HI,
    I've a asp.net application that add a dynamic usercontrol with a
    button. If i've tried to click it Click Event don't load.
    But into a static usercontrol it's happens.
    Anyone can help me?
     
    Luca, Mar 25, 2005
    #1
    1. Advertising

  2. Luca,

    Make sure you are reloading the user control on the post back. Also, at
    won't point do you dynamically load it?

    Ian Suttle
    http://www.IanSuttle.com

    "Luca" wrote:

    > HI,
    > I've a asp.net application that add a dynamic usercontrol with a
    > button. If i've tried to click it Click Event don't load.
    > But into a static usercontrol it's happens.
    > Anyone can help me?
    >
     
    =?Utf-8?B?SWFuIFN1dHRsZQ==?=, Mar 25, 2005
    #2
    1. Advertising

  3. Luca

    Johan Guest

    If you add a new button make sure to register a event-handling method for
    the click event.

    Button1.Command += new CommandEventHandler(this.visa_click);

    /Johan
     
    Johan, Mar 26, 2005
    #3
  4. Luca

    Luca Guest

    i seen this scenario...
    if i add usercontrol on page load sub, the event method of button work
    fine.
    But into my application the usercontrol display same information that
    i have only after i have same information from database.
    There's a method where could i modify a literal into usercontrol added
    into page load????

    Best Rgds
    Luca

    "Johan" <> wrote in message news:<>...
    > If you add a new button make sure to register a event-handling method for
    > the click event.
    >
    > Button1.Command += new CommandEventHandler(this.visa_click);
    >
    > /Johan
     
    Luca, Mar 29, 2005
    #4
  5. Luca

    Jc Morin Guest

    Hi Johan

    Any html can be customized from code-behind, just make it part of a html
    know control such as <span> or <label>, and an id, runat="server" and you
    can change it's value in the page load if you want.

    --------------------------
    Jean-Claude Morin, MCP
    Software Developer
    2k1Soft/kCentric, Canada


    "Luca" <> wrote in message
    news:...
    > i seen this scenario...
    > if i add usercontrol on page load sub, the event method of button work
    > fine.
    > But into my application the usercontrol display same information that
    > i have only after i have same information from database.
    > There's a method where could i modify a literal into usercontrol added
    > into page load????
    >
    > Best Rgds
    > Luca
    >
    > "Johan" <> wrote in message

    news:<>...
    > > If you add a new button make sure to register a event-handling method

    for
    > > the click event.
    > >
    > > Button1.Command += new CommandEventHandler(this.visa_click);
    > >
    > > /Johan
     
    Jc Morin, Mar 29, 2005
    #5
    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. Purvi T
    Replies:
    0
    Views:
    922
    Purvi T
    Oct 19, 2004
  2. jorge
    Replies:
    2
    Views:
    1,338
    jorge
    May 26, 2004
  3. Amy
    Replies:
    0
    Views:
    1,028
  4. Max2006
    Replies:
    2
    Views:
    1,637
    Walter Wang [MSFT]
    Sep 19, 2007
  5. Luca

    Button Event into dynamic UserControl

    Luca, Mar 31, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    120
Loading...

Share This Page