login control question

G

Guest

i created a basic login control and changed it to a template.
Then i droped a label on to it. in code behind it can not be found?
I tried me.logincortrol.whatever but it can't be found. Ok this is basic,
but what the problem? Why can't it be found?
 
M

MSDN

WB,

if you add a Label into the template some place

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

Then use this code below in code behind

CType(Login1.FindControl("Label1"), System.Web.UI.WebControls.Label).Text =
"Bla, Bla Bla"

Sa
 
G

Guest

....and if you are using master pages you have to find the contentplaceholder
first i'll bet?
I appreciate your answer so don't take this as directed at you, and I think
you'll agree: that's dumb, the control is supposed to be easy to allow
non-programmers to do tasks like this, but not at the expense of higher level
developers time.
Granted it's an easy thing to do, but it's like a onestep forward two steps
backward thing.
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


MSDN said:
WB,

if you add a Label into the template some place

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

Then use this code below in code behind

CType(Login1.FindControl("Label1"), System.Web.UI.WebControls.Label).Text =
"Bla, Bla Bla"

Sa
 
M

MSDN

WB,

In many ways you are right.

You see all this "easy" stuff is for Demos only. Easy is the big lie.
I have not seen anything easy when you try to understand things in depth.
It is easier; maybe? but demands are going up and up and up.
If its easy then anyone can do it and you may hire a minimum wage person to
do it then why bother go to the beach and enjoy life.
every time I hear "easy" there is a lack of depth in understanding the
problem to a good solution.

Its like the Cell-Phone one step forward ( talk from anywhere ) many steps
backward ( bad connection, drop offs, battery issue, Brain cancer, accidents
etc...)

Just learn it and do it or hire a programmer to do it for you,

happy programming,

Sa


WebBuilder451 said:
...and if you are using master pages you have to find the
contentplaceholder
first i'll bet?
I appreciate your answer so don't take this as directed at you, and I
think
you'll agree: that's dumb, the control is supposed to be easy to allow
non-programmers to do tasks like this, but not at the expense of higher
level
developers time.
Granted it's an easy thing to do, but it's like a onestep forward two
steps
backward thing.
 

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

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top