views:

44

answers:

1

Hi

I have a simple hyperlink server control which i am trying to reference from my code behind page.

It is inside a Login server control (shows the username and password boxes to login) which has been converted to an editable template, and this is also inside a LoginView.

I can easily reference a server control outside of the Login control using:

DirectCast(LoginView1.FindControl("hlSignup2"), HyperLink).NavigateUrl = signupLink

How ever, when this link is placed inside the templated login control i can't seem to reference it?

Thanks

A: 

ok, figured it out...simple in the end...

Dim loginControl As Login = DirectCast(LoginView1.FindControl("Login1"), Login)
Dim hlSignup As HyperLink = loginControl.FindControl("hlSignup1")
hlSignup.NavigateUrl = signupLink