Last post Nov 26, 2008 03:38 AM by Pavlo
Apr 04, 2008 08:50 AM|Idsa|LINK
I am creating a usercontrol. After adding <asp:Button ID="Register" runat="server"> control to markup, I go to codebehind and try to write this.Register... but there is no such a variable. I looked to the designer file and found out that there is Registration
HotFix didn't help :)
Apr 04, 2008 10:30 AM|yassir.2|LINK
u can get it with out the this keyword
Apr 04, 2008 11:23 AM|Idsa|LINK
I can't access this property neither through this.Register nor Register
Apr 06, 2008 05:48 PM|leadmagnet|LINK
I have EXACTLY the same problem (only in VB)!!!! [:'(]
I have a UC with a LoginView control. In the <LoggedInTemplate> section I have a panel that I want to set the "visibility" property. But NONE of the controls in this section can be referred to in the code behind (Page_Load event)!!!
Nothing I do will expose these controls to the code behind! WTF!!! [:@][:@][:@]
I'm about to give up on the UserControlapproach and code this directly in the MasterPage!!!!!
We need GURU HELP!!!! [:S]
user control content
user control show hide enable disable roles
Apr 07, 2008 12:43 AM|Idsa|LINK
leadmagnet, are you using Visual Studio 2008? I think it may be VS 2008 bug. Moderators, please move this topic back to VS 2008 forum.
Apr 07, 2008 06:52 AM|leadmagnet|LINK
I am using VS2008! Come to think of it, I'm sure I've done this successfully in VS2005TS, but what is the difference?
Apr 07, 2008 07:25 AM|Idsa|LINK
I have solved my problem.
I had a control MembershipRegistration.ascx and page MembershipRegistration.aspx, which used this control. Of course these control and page used codebehind class called MembershipRegistration. This is the source of my bug. Then I changed control's name to
MembershipRegistrationControl and it worked.
May be the source of you problem is other but surely it is not a VS 2008 bug :)
Apr 12, 2008 02:22 PM|leadmagnet|LINK
I have tried the same thing, no luck. Strange thing is, I have another app, with the identical control, and it works fine!
Nov 25, 2008 07:55 AM|Pavlo|LINK
Nov 26, 2008 03:38 AM|Pavlo|LINK
The issue is that yours server-side control is inside another control, for instance asp:LoginView. In order to access child control you can use FindControl function.
AutoEventWireup should be true !