|
|
 |
RE: FN-FORUM: .NET Newbie Q
date posted 21st July 2005 06:23
Hi Mate
=20
This should happen automagically as the wonders of system.reflection
works its thang. You should be declaring it in the code behind with:=20
=20
Protected WithEvents myLabel As System.Web.UI.WebControls.Label
=20
Notice the WithEvents
=20
Also ensure you are using the Label from the Web Forms toolbox and not
the HTML toolbox as they are different ie one uses the runat=3D"server"
declaration in the HTML, the other doesn't.
HTH
=20
w
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Damon
Sent: 21 July 2005 00:43
To: wayne
Subject: RE: FN-FORUM: .NET Newbie Q
You should be able to edit it with no problem, because that's what I
have
been doing for years
When I reference it I use
protected System.Web.UI.WebControls.Label lblname; (for example)
From that point onwards it is accessible
You could always switch to .Net 2.0, no need to reference controls on
your
form, they are all accessible in the code
Damon
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Craig
Sent: 21 July 2005 00:32
To: FN-FORUM / [EMAIL REMOVED]
Subject: FN-FORUM: .NET Newbie Q
Hi,
A Visual Studio.NET question...
If I drag a label web form control on to the design surface then go to
the
"code behind" page I can programme it and all is well. However, if I
add
one in the HTML screen and then add references to it in the "code
behind"
page I get errors. Is VS doing things that aren't apparent in Designer
mode
or is there a way to get it done by hand and it work properly?
I'm getting a bit frustrated with the designer, I have more control by
hand
coding, hence the question.
Thanks in advance,
Craig
--=20
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
--=20
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|