Last post Oct 14, 2010 04:15 AM by Amar Choubey
Jan 17, 2008 11:12 AM|Ted C|LINK
I'm trying to reproduce some examples in my ASP.NET book, and they include the following commands...
Label lbl = GetLabel(275, 20);
I get the following errors when I try to build it...
The type or namespace name 'GetLabel' could not be found (are you missing a using directive or an assembly reference?)
The name 'RecurseNodes' does not exist in the current context
I can't seem to find anything in the examples saying that I need to import namespaces, so I'm not sure what's amiss.
Jan 17, 2008 12:10 PM|johnnystock|LINK
Hehe, I know the book to which you refer and the GetLabel method is defined elsewhere in that same book. I don't recall the page but I would look near the beginning of the chapter you are currently in.
Jan 17, 2008 01:09 PM|Ted C|LINK
I've discovered that about the RecurseNodes method, actually, but I haven't found the GetLabel method, and the error message made me think it must exist in one of the namespaces.
Oh, well. I've just be putting Label controls on the page and referring to them instead.
Jan 17, 2008 01:17 PM|johnnystock|LINK
Try pages 254 & 255 :)
Jan 17, 2008 04:33 PM|Ted C|LINK
Yep, that's exactly it.
Microsoft .NET 2.0 Web-Based Client Development Self-Paced Training Kit
Jan 17, 2008 04:46 PM|johnnystock|LINK
Yep, that's the book. :)
If you don't mind marking as answer I'd appreciate it. Thanks.
Jan 17, 2008 07:48 PM|Ted C|LINK
It's hard to remember that little detail...
Oct 14, 2010 04:15 AM|Amar Choubey|LINK
for GetLabel method please follow this code:
private Label GetLabel(int left, int top)
Label lbl = new Label();
lbl.Style.Add("top", top.ToString() + "px");
lbl.EnableViewState = false;
Please Declare this method and then call it.