asp.net linkbutton event not firing

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

  1. webdad3

    webdad3 Guest

    All,

    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
    don't...

    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
    Response.Write("hi")
    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.
    http://www.parentsdb.com/
     
    webdad3, Jul 6, 2003
    #1
    1. Advertising

  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:
    http://obies.com/vga/blog.aspx

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

    and not by private mail.
    "webdad3" <> wrote in message
    news:...
    > All,
    >
    > 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
    > don't...
    >
    > 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
    > Response.Write("hi")
    > 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.
    > http://www.parentsdb.com/
     
    Victor Garcia Aprea [MVP], Jul 7, 2003
    #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. Solomon Shaffer

    Wrong LinkButton Firing Event - Very Odd

    Solomon Shaffer, Jul 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    345
    Solomon Shaffer
    Jul 29, 2004
  2. JoakimR
    Replies:
    3
    Views:
    3,692
    John Saunders
    Jan 8, 2005
  3. Mantorok

    LinkButton event not firing

    Mantorok, Feb 21, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    528
    Karl Seguin
    Feb 21, 2005
  4. Mel
    Replies:
    6
    Views:
    574
  5. webdad3

    asp.net linkbutton event not firing

    webdad3, Jul 5, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    181
    webdad3
    Jul 5, 2003
Loading...

Share This Page