FormView: how to bind events to controls inside a loaded template?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ElwoodBDR529
    New Member
    • Jan 2010
    • 1

    FormView: how to bind events to controls inside a loaded template?

    Hi,
    I'm using a FormView with a dynamically loaded item template. Inside the template (an ascx file loaded through Page.LoadTempla te(...) ) there is a button and I need to invoke the click event on that button.
    Any ideas?

    Thanks in advance,
    ElwoodBDR529
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    The button click event is triggered when the user clicks the button. That event is handled by the control that owns the button (ie your user control).

    If you need to call the functionality that is in the button click event then move it into a public function that can be access by both the button click event and the parent code.

    -Frinny

    Comment

    Working...