Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 10th, 2008, 09:33 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 10 - Ajax try it out

After I add an update panel to the ContactForm.ascx file, I couldn't view anything in the Design mode. Additionally, it shows an error and doesn't recognize the class in the div:

<div class="pleaseWait">
Message being sent, please wait...
</div

(it's .pleaseWait in the css file also)

Although it shows an error, it still does work when I send the email.

I have the same problem when I open the code that comes with the book.

Reply With Quote
  #2 (permalink)  
Old April 10th, 2008, 10:21 AM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi VeganMan,

It can't find pleaseWait because it's defined in a theme stylesheet, not in a CSS file that is directly included in a master page for example.
The design issue is probably a bug in Visual Studio 2008. I have that every now and then as well. During early betas this issue has been reported and fixed, but sometimes it seems to reappear.

First, try removing the style in the head of the page:

<style type="text/css">
  .style1
  {
    width: 100%;
  }
</style>

If that fails, try this:

1. Close Visual Studio

2. Open Visual Studio and close all open files

3. Right-click the Solution or Project and choose Rebuild / Rebuild All

4. Resolve any errors and repeat steps 1 through 3.

5. Open the User Control in design view.

If it still doesn't work, I suggest you report this issue with Microsoft as it is supposed to work.....

Cheers,

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.
Reply With Quote
  #3 (permalink)  
Old April 10th, 2008, 08:44 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried everything and it doesn't work. I created a few simple pages to try a few things out. None the classes and CssClasses are not recognized in VWD 2008 in the controls (although it is recognized in the browser). The classes work fine when working on regular aspx file, so you'd expect it to work in ascx files. I'm not talking about in Design View, rather in Code View.


Back to viewing in design view. I can view the page when I comment out:

<asp:UpdatePanel ID="UpdatePanel" runat="server">

I get this effect when using both my laptop and my desktop computer.

I wonder if anyone else has that problem (do you)? I will report it to Microsoft after I check out to see if others have problems. Thanks

Reply With Quote
  #4 (permalink)  
Old April 10th, 2008, 11:46 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh Goodie... :D

I just removed the following so it didn't work:

<style type="text/css">
  .style1
  {
    width: 100%;
  }
</style>

But it worked by removing the class from the table tag:

<table <s>class="style1"</s> runat="server" id="FromTable">

At least I understand that the problem is when using embedded styles on a control file. But that's no problems because I can add the style to external css instead. I rather do that anyway.

It also clicked in why it doesn't recognize the external style sheet. There is no reference to the style sheet until the control is loaded in the aspx file, and the aspx file gets the theme (and css) from the master page. I'm a little slow at times, sorry.

Thanks for your help Imar. And thanks for making room for me to figure things out. I'm a happy camper now and have a better understanding.

Terry

Reply With Quote
  #5 (permalink)  
Old April 11th, 2008, 12:52 AM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:There is no reference to the style sheet until the control is loaded in the aspx file, and the aspx file gets the theme (and css) from the master page.
Exactly; that is also why selectors from themes won't show up in pages: they aren't known until run-time.

Glad it's all working out. Only 8 more to go.... Next up are databases..... ;)

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.
Reply With Quote
  #6 (permalink)  
Old May 2nd, 2008, 05:11 PM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

In case anyone else runs into this, it's now a confirmed issue with some work arounds: http://blogs.msdn.com/webdevtools/ar...-controls.aspx

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 fixes .MAttButler BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 2 September 3rd, 2006 08:02 PM
Chapter 10 gogeo BOOK: Beginning Access 2003 VBA 1 January 22nd, 2006 09:41 AM
Chapter 10 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 March 29th, 2005 09:35 AM
Chapter 10 columbiasmiles JSP Basics 0 May 17th, 2004 08:09 PM



All times are GMT -4. The time now is 05:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.