Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: .NET Newbie Q

date posted 21st July 2005 07:59

Thanks for the replies guys.

So are you saying (Wayne) that for every type of web form control I want to
use I need to add it's reference explicitly in the top of every "code
behind" page? It seems odd when if there's a mixture of labels in the same
function, some to controls dragged into the designer and some put in my hand
coding, the dragged ones work and the hand coded ones don't. The syntax I'm
using is correct. If I then replace a hand coded control with a dragged in
one then it all works.

The error I get (Andy) is 'Name "newlabelname" is not declared'.

I'll look up "system.reflection" to see what you're talking about.

Another annoyance is, there seems to be no way to control the case of inline
style attributes, they're ALWAYS capitalised whether you like it or not. Do
you just live with that?

As far as .NET 2.0 is concerned, that's far too near the bleeding edge of
technology for me. I thought VS 2003 would be bedded down enough by now and
have sufficient support to get me going quickly. I'm doing this for
production purposes, not for fun or to satisfy masochistic tendencies, lol.

Cheers,

Craig

-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of wayne
Sent: 21 July 2005 06:55
To: FN-FORUM / [EMAIL REMOVED]
Subject: RE: FN-FORUM: .NET Newbie Q


Hi Mate

This should happen automagically as the wonders of system.reflection
works its thang. You should be declaring it in the code behind with:

Protected WithEvents myLabel As System.Web.UI.WebControls.Label

Notice the WithEvents

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="server"
declaration in the HTML, the other doesn't.
HTH

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






Messages by Day
July 31st 2005
July 30th 2005
July 29th 2005
July 28th 2005
July 27th 2005
July 26th 2005
July 25th 2005
July 24th 2005
July 23rd 2005
July 22nd 2005
July 21st 2005
July 20th 2005
July 19th 2005
July 18th 2005
July 17th 2005
July 16th 2005
July 15th 2005
July 14th 2005
July 13th 2005
July 12th 2005
July 11th 2005
July 10th 2005
July 9th 2005
July 8th 2005
July 7th 2005
July 6th 2005
July 5th 2005
July 4th 2005
July 3rd 2005
July 2nd 2005
July 1st 2005


Messages by Month
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005


Messages by Year
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000