Button Event into dynamic UserControl

Discussion in 'ASP .Net Web Controls' started by Luca, Mar 31, 2005.

  1. Luca

    Luca Guest

    I've a DYNAMIC usercontrol with a button...if i click i have only a
    submit of the page without passing into Button1_Click function Why???

    The usercontrol it's created into a webForm (Default.aspx) that call
    the following function...

    Private Sub BindBloccoDettaglio()
    dim sVar
    Dim usercontrol As Control
    usercontrol = LoadControl("Blocco_Dettaglio_Hotel.ascx")
    Dim element As Dettaglio = CType(usercontrol,
    Blocco_Dettaglio)
    element.MyVar = sVar
    element.DataBind()
    Controls.Add(element)
    Dim w As StringWriter = New StringWriter
    Dim sOutput As HtmlTextWriter = New HtmlTextWriter(w)
    element.RenderControl(sOutput)
    Me.Response.Write(w.GetStringBuilder().ToString())
    Response.Flush()
    End Sub
     
    Luca, Mar 31, 2005
    #1
    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. Luca
    Replies:
    4
    Views:
    9,082
    Jc Morin
    Mar 29, 2005
  2. Replies:
    3
    Views:
    3,717
    Arthur
    Jun 23, 2008
  3. Event not firing in usercontrol inside usercontrol

    , Dec 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    183
  4. Event not firing in usercontrol inside usercontrol

    , Dec 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    187
    vatech1993
    Dec 11, 2004
  5. Event not firing in usercontrol inside usercontrol

    , Dec 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    155
Loading...

Share This Page