0

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

4

1 回答 1

0

好的,想通了...最后很简单...

Dim loginControl As Login = DirectCast(LoginView1.FindControl("Login1"), Login)
Dim hlSignup As HyperLink = loginControl.FindControl("hlSignup1")
hlSignup.NavigateUrl = signupLink
于 2010-01-07T23:37:22.517 回答