Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2008, 06:18 PM
Registered User
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# Ch 10 Page 370 - Simple User Control

After creating my custom user control, when I try to drag it onto the design view of default.aspx, all that happens is I create a link, instead of inserting ym control into the form as shown in the book.

I have got around this by completing the exercise by using the 2 appropriate source lines to insert the control into ASP forms, but I was wondering why the dragging method did not work. Is this a setting in visual studio?

I am using Visual Web Developer Express 2008.

 
Old February 24th, 2008, 06:27 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Is the application error free? (Try building it). I think I have seen this once before when the application had errors, or when the UC wasn't valid....

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old February 25th, 2008, 04:16 AM
Registered User
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The application is definately error free.
If I add the lines to register my control, and then call my control in source view it works fine. So really it is not a big problem, I just wondered why the dragging method did not work?

 
Old February 25th, 2008, 01:52 PM
Registered User
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have found the answer, and also the answer to my other problem!
It is a little bit stupid!

I was using a directory with part of the name being "c#".
Because the # was not a legal character for this it caused my problems. It also stopped the ASP.NET configuration tool from working.

As soon as I changed the directory name all the problems stopped occurring. It is something worth bearing in mind for the future.

 
Old February 25th, 2008, 01:53 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Maybe there is something wrong with your setup or with your site / setup? Here's what I just did and which worked fine:

1. Choose File | New Web Site. Create a new C# web site

2. Added a new User Control to the site

3. Dragged the UC onto the Design View of Default.aspx. Worked as expected and I was able to open the Smart Tasks panel of the UC.

AFAIK, this is all how it's supposed to work. It works for me every time.

Maybe your situation is different? (I don't have the book, so I don't know the exact steps you are following). In that case, can you elaborate?

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
C# Ch 10 Page 362 surefire BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 February 25th, 2008 01:55 PM
Page 370 - New ContextMenu MajorD BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 2 July 25th, 2007 10:26 AM
Error with CH. 10 ObjectDataSource Control in C# dramsey BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 7 February 14th, 2007 11:09 PM
Chapter 10 User Control Problem sookarama BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 October 16th, 2006 06:24 AM
Code snippet error on page 370 cebartling BOOK: Professional Java Development with the Spring Framework 0 September 18th, 2005 10:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.