troubleshooting Question

Problem Accessing the Button within the Login Control LayOutTemplate

Avatar of tony_trotter
tony_trotterFlag for United States of America asked on
7 Comments1 Solution421 ViewsLast Modified:
I'm sure there is probably an easy sanswer to this but I'm tired of working on it.  Maybe someone out there has a quick answer to this.

I have a login control that exists within a panel.  I have converted the Login control to a template and would like to set the LoginButton of the Login control to be the DefaultButton of the panel.  Simple  . . . .Right?  Wrong.  I can't seem to make the code find the LoginButton.  Here is the code I tried to use.  What did I do wrong?

        Dim btnLoginButton As New Button
        btnLoginButton = Me.loginbox.FindControl("LoginButton")
        pnlBackground.DefaultButton = "btnLoginButton"

Thanks in Advance.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros