newbie: Problems with LoginView

J

Jeff

Hey

asp.net 2.0

Sorry but I'm a newbie that's trying to learn asp.net 2.0. And I've come
across something within LoginView I don't understand....

In code view I can access a label placed directly on a webpage.. But I
cannot access a label control placed within a LoginView control on the same
form. I guess this isn't just about Labels, I have the same problem with
TextBoxes too....

Lets say I've placed a textbox in a loginview, and called the textbox
"txtSomething". When I in code view start typing "tx"... the type ahead
(drop down list with available properties, what is it's real name??) appear,
but no txtSomething can be found....

But it works if the textbox is placed outside the LoginView

I've also tryed to access the TextBox this way:
LoginView1.LoggedTemplate. But the type ahead don't show the textbox here
either....

What should I do to access the controls in LoginView from code view?

Jeff
 
J

Jack

Yes, I had a similar thing. I also think you have to cast the web control as
well; see my code I use:

(CheckBox)LoginViewMain.FindControl("CheckBoxPDF")).Checked == true; //
Set the Checkbox to true



Jack.
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top