Refer to Object in UserControl???

G

Guest

Can someone please tell me how I refer to a Hyperlink object in a usercontrol
from a sub in another aspx page???

I want to change the visibile attribute of a hyperlink in a user control
from an aspx page...

EG:

ASPX Page...

headerMenu.urlAdmin.visible = True

where headerMenu is the userControl name...

I get a message saying the object is not accessiable due to the fact that it
is protected????

Any ideas...

Thanks
 
G

Guest

Thanks...

Why do I then get this message...

Reference to a non shared member requires an object reference...
Sorry for a probably very dumb question but I'm kind of new to asp.net

Thanks again
 
K

Karl Seguin

headerMenu might be the control name, but what's the intance name?

in your page you hve

Protected menu as HeaderMenu

then you should use

menu.urlAdmin
not
HeaderMenu.urlAdmin


you want the link button for the instance of your menu

Karl
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top