linkbutton event not firing

Discussion in 'ASP .Net Building Controls' started by webdad3, Jul 6, 2003.

  1. webdad3

    webdad3 Guest


    I am unsure of why this is happening... When I run the same code at
    work, I get the expected results. However, when I'm at home I

    I have a LinkButton in a web user control that when I click on it I
    want to raise an event back the the .aspx page.

    Here is the code behind for the web user control:

    Public Event linkbuttonclick()
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    'Put user code to initialize the page here
    End Sub

    Private Sub lbutton_Click(ByVal sender As System.Object, ByVal e
    As System.EventArgs) Handles lbutton.Click
    RaiseEvent linkbuttonclick()
    End Sub

    My .aspx page is simply this:

    Protected WithEvents lbut As spin

    Private Sub lbut_linkbuttonclick() Handles lbut.linkbuttonclick
    End Sub

    When I debug it never gets to the above code (.aspx). However, when
    I'm at work it does! My javascript is turned on (in my browser). I
    don't know what else to do. Can someone please offer some advice!!!!!

    Thank You,

    Jeff V.
    webdad3, Jul 6, 2003
    1. Advertisements

  2. Hi,

    Is the page posting back at all? Is the browser showing any script errors?

    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:

    To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

    and not by private mail.
    Victor Garcia Aprea [MVP], Jul 7, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.