all groups > asp.net building controls > july 2003 >
You're in the

asp.net building controls

group:

asp.net linkbutton event not firing


asp.net linkbutton event not firing jeff_vaccaro NO[at]SPAM hotmail.com
7/6/2003 6:00:57 AM
asp.net building controls:
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.
Re: asp.net linkbutton event not firing Victor Garcia Aprea [MVP]
7/6/2003 9:11:38 PM
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.
[quoted text, click to view]

AddThis Social Bookmark Button