|
-
May 30th, 2005, 04:11 AM
#1
Thread Starter
New Member
[Resolved] Trouble firing events in code behind of user control
Ahoy
I am trying to use an asp:linkbutton on a .ascx file (user control), but it does not seem to be firing the click event in the code behind. I have put breakpoints on the first line of the event and in the page load of the user control, but it does not get to any of these. All it does is it postbacks to the server and goes through the page load event of the actual form (.aspx) that the user control is sitting on.
Any ideas?
Thanks
Last edited by muri; Jun 1st, 2005 at 01:56 PM.
-
May 30th, 2005, 11:59 AM
#2
Re: Trouble firing events in code behind of user control
 Originally Posted by muri
Ahoy
I am trying to use an asp:linkbutton on a .ascx file (user control), but it does not seem to be firing the click event in the code behind. I have put breakpoints on the first line of the event and in the page load of the user control, but it does not get to any of these. All it does is it postbacks to the server and goes through the page load event of the actual form (.aspx) that the user control is sitting on.
Any ideas?
Thanks
How are you assigning the Click Event to teh LinkButton and how are you handling it?
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
May 30th, 2005, 06:01 PM
#3
Thread Starter
New Member
Re: Trouble firing events in code behind of user control
The following code is placed on the .ascx for the linkbutton's click event
Private Sub lnkLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lnkLogin.Click
'code
End sub
...it just never goes thru this code
-
May 31st, 2005, 12:40 AM
#4
Re: Trouble firing events in code behind of user control
Hmm that should not happen. Are you sure you are running on "Debug" mode and ASP.Net "Debugging" is enabled?
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
May 31st, 2005, 06:16 PM
#5
Addicted Member
Re: Trouble firing events in code behind of user control
Make sure you are reloading your controls onto the form after the postback, or else the events for them wont fire. Happened to me
-
Jun 1st, 2005, 02:00 PM
#6
Thread Starter
New Member
Re: [Resolved] Trouble firing events in code behind of user control
Yeh that was my problem - wasnt reloading the user controls on postback.
thanks patch
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|