UserControl - Doesn't fire child events

Discussion in 'ASP .Net Web Controls' started by Q Dennis, Sep 20, 2004.

  1. Q Dennis

    Q Dennis Guest

    Hi,

    I have a user simple usercontrol with a button, created with VS2005, the
    Load event fires but the Button event doesn't.

    <%@ Control Language="VB" AutoEventWireup="false"
    CompileWith="WebUserControl.ascx.vb" ClassName="WebUserControl_ascx" %>
    <asp:Button ID="Button1" Runat="server" Text="Button" />

    +=================================================

    Partial Class WebUserControl_ascx

    Private Sub Page_Load(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles Me.Load
    MsgBox("Load")
    End Sub

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles Button1.Click
    MsgBox("Click")
    End Sub
     
    Q Dennis, Sep 20, 2004
    #1
    1. Advertising

  2. I believe I am having this same problem. See my post with the subject:
    Linkbutton in User Control Not Working.

    Tony

    "Q Dennis" <> wrote in message
    news:%...
    > Hi,
    >
    > I have a user simple usercontrol with a button, created with VS2005, the
    > Load event fires but the Button event doesn't.
    >
    > <%@ Control Language="VB" AutoEventWireup="false"
    > CompileWith="WebUserControl.ascx.vb" ClassName="WebUserControl_ascx" %>
    > <asp:Button ID="Button1" Runat="server" Text="Button" />
    >
    > +=================================================
    >
    > Partial Class WebUserControl_ascx
    >
    > Private Sub Page_Load(ByVal sender As Object, ByVal e As
    > System.EventArgs) Handles Me.Load
    > MsgBox("Load")
    > End Sub
    >
    > Private Sub Button1_Click(ByVal sender As Object, ByVal e As
    > System.EventArgs) Handles Button1.Click
    > MsgBox("Click")
    > End Sub
    >
    >
     
    Anthony Hunter, Sep 20, 2004
    #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. KK
    Replies:
    0
    Views:
    435
  2. =?Utf-8?B?S2lt?=

    Dropdownlist in usercontrol doesn't fire

    =?Utf-8?B?S2lt?=, Mar 19, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,807
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Mar 21, 2006
  3. Jeff Rodriguez
    Replies:
    23
    Views:
    1,132
    David Schwartz
    Dec 9, 2003
  4. KK
    Replies:
    0
    Views:
    154
  5. KK
    Replies:
    0
    Views:
    130
Loading...

Share This Page