HELP - Link Button on User Control 'Losing its Mind'

Discussion in 'ASP .Net' started by Normie Smith, Apr 5, 2004.

  1. Normie Smith

    Normie Smith Guest

    Hello...

    I have a strange situation happening, and I thought maybe I could get some assistance.

    I have created a simple user control (.ascx) file that's part of my default.aspx page. The user control contains a link button control, such as:

    <asp:LinkButton id="idLinkButtonopenAll" runat="server">open all</asp:LinkButton>

    Then in my code-behind file, I have it's event handler, such as:

    public class reports : System.Web.UI.UserControl
    {
    protected System.Web.UI.WebControls.LinkButton idLinkButtonopenAll;

    private void Page_Load(object sender, System.EventArgs e)
    {
    if (!IsPostBack)
    {
    // Other code here...
    }
    }


    private void idLinkButtonopenAll_Click(object sender, System.EventArgs e)
    {
    // Code here to be executed when the link button is clicked
    }
    }


    Sometimes the link button works fine and executes the code contained in the event - private void idLinkButtonopenAll_Click(object sender, System.EventArgs e). But, other times (and I have not explanation why because I don't even make code changes or anything), the link button control seems to 'lose its mind,' meaning that it simply won't execute the code inside the event handler. I've put breakpoints inside the event handler and the control never even tries to execute the code in the event handler.

    Has anyone seen or had this kind of problem? If so, what's going on? Or, am I possible doing something wrong?

    Thanks for the help.
     
    Normie Smith, Apr 5, 2004
    #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. Replies:
    7
    Views:
    482
    Roedy Green
    Dec 26, 2005
  2. Greg C.
    Replies:
    8
    Views:
    412
  3. Normie Smith

    HELP - Link Button on User Control 'Losing its Mind'

    Normie Smith, Apr 5, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    119
    Normie Smith
    Apr 5, 2004
  4. thunk
    Replies:
    1
    Views:
    318
    thunk
    Mar 30, 2010
  5. thunk
    Replies:
    0
    Views:
    491
    thunk
    Apr 1, 2010
Loading...

Share This Page