|
|
 |
Re: FN-FORUM: .NET Newbie Q
date posted 21st July 2005 11:58
Hi Craig,
to do it by hand this is what you do..
in your html you would add this
asdf
and then in your code behind (i'm using c# but is the same for vb.net)
you should declare the control like
protected System.Web.UI.WebControls.Label label1;
in your class constructor you have to create a new instance of the control =
by
label1 =3D new System.Web.UI.WebControls.Label();
and then attach any events to it.
VS.Net does this for you and writes this code in the
InitializeComponent method when you drag and drop a control.
what i do is drag the control to the web form and then place the
control in HTML manually, this way i get the code behind and have more
control.
in vs.net settings there is an option to make all your tags and
attributes lowercase.
HTH
Hibri
On 20 Jul 2005 23:32:22 -0000, Craig [EMAIL REMOVED] wrote:
>=20
> Hi,
>=20
> A Visual Studio.NET question...
>=20
> If I drag a label web form control on to the design surface then go to th=
e
> "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 m=
ode
> or is there a way to get it done by hand and it work properly?
>=20
> I'm getting a bit frustrated with the designer, I have more control by ha=
nd
> coding, hence the question.
>=20
> Thanks in advance,
>=20
> Craig
>=20
>=20
>=20
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>=20
> To advertise here: http://www.freelancers.net/advertising.html
>=20
> |
 |
|