Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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 May 17th, 2015, 08:48 AM
Registered User
 
Join Date: May 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning ASP.NEt 4.5 in C# & VB

pages 359 361:

Being new to all this I may have missed something but I found the two 'Please Wait.gif' images needed slightly different definitions in the two ('DarkGrey' & 'Monochrome') theme .PleaseWait Css' in order for both versions to display the animated image...I just stuck an 'm' at the end of one(both the image name in Monochrome images and the reference to it in the Monochrome Css), thus...'PleaseWaitm.gif' - and it worked...or you can put the Monochrome 'PleaseWait.gif' in the site's general images folder and then, in the Monochrome theme .PleaseWait Css, refer to it with an extra '/' right before 'Images' so as to indicate you want to use the 'PleaseWait.gif' held in the general site Images folder and not the Images folder for the 'Monochrome' theme.

Last edited by Robert Knight; May 17th, 2015 at 11:48 AM.. Reason: extra thoughts
 
Old May 17th, 2015, 04:10 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 Robert,

Can you post the CSS for the spinner? If the images are in a subfolder called Images relative to the CSS file you can refer to the images like this:

background-image: url(Images/PleaseWait.gif);


Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old May 18th, 2015, 08:29 AM
Registered User
 
Join Date: May 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Monochrome Theme problem

Hi Imar,

This is the code I have in the DarkGrey theme CSS
[.PleaseWait
{
height: 32px;
width: 500px;
background-image: url(Images/PleaseWait.gif);
background-repeat: no-repeat;
padding-left: 40px;
line-height: 32px;
}]

It worked fine but simply pasting it in to the Monochrome theme CSS resulted in the image/gif not showing up in that(Monochrome) theme when opening that theme in my browser.(maybe something to do with two images with the same name in the same folder?)

However, when I changed the name of the Monochrome gif image(I added 'm' to the end...'PleaseWaitm.gif') it worked in the Monochrome theme too...which was necessary as each image is tailored to the particular theme.

Whatever, following your bit earlier in the book about putting images in a separate site folder(the one containing the two banner versions for example) so as to use a single image in many ways across the site, I've now stuck the Monochrome 'PleaseWait.gif' in that folder and refer to it in the Monochrome CSS with the extra leading forward slash, thus:

[.PleaseWait
{
height: 32px;
width: 500px;
background-image: url(/Images/PleaseWait.gif);
background-repeat: no-repeat;
padding-left: 40px;
line-height: 32px;
}]

..and it works perfectly...as has everything else in your book...so far.

Whoops! I spoke too soon. Working the 'Try It Out' (pages 410-413) I found, again, that the css for the DarkGrey theme worked but the '.Attention' bit for the Monochrome theme didn't work fully in that that the 'message sent' animation didn't appear...just 'message sent' in plain text. Trying all sorts of things out I finally succeeded by simply changing the Monochrome theme css name to-'Monochrome.Css' instead of 'Monochrome.css'...thus differentiating it from my 'DarkGrey.css'...and then I found that, under the newly named 'Monochrome.Css' the 'PleaseWait' spinner image also worked when placed back in the Monochrome Images folder.

I reckon somewhere I may have configured things so that, in some cases parts of the 'Monochrome.css' aren't accessed properly if they are first referenced in the DarkGrey.css.

Thanks, again, for your reply.

Last edited by Robert Knight; May 19th, 2015 at 09:31 AM.. Reason: Similar problem encountered
 
Old May 19th, 2015, 06:37 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sounds like a cache issue? Have you tried refreshing the browser using Ctrl+F5 after making changes to CSS files?

The example in the book should work, and the source code that comes with the book should work as well, so it's either a code / setup issue or a caching issue.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old May 20th, 2015, 09:28 AM
Registered User
 
Join Date: May 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You're doubtless correct that it's a caching problem as I've tried Ctrl + F5 many times-in addition to re-doing/re-jigging the CSS Monochrome Page amongst other things...Which resulted in my having to build things from scratch again!

I'm rather loath to clear my cookies/history etc. as there are a couple of important sites I visit that this messes up quite a bit( I have to try and remember alternative passwords and the like because the usual ones have been forgotten).

I'll leave it as it is for now as both themes and associated CCS' work perfectly and all your other code works exactly as defined in the book...the bit I'm on now regarding Databases is especially good...if only all this was as straightforward as C++ in Visual Studio Express For Desktop(which I started learning before this) where you just have one language to write, from scratch, in a single IDE, and the console/files for input/output.

This is very much more a tricky mental juggling act between a number of related programming languages and locations but, apart from this minor (caching) thing with the Monochrome Css, everything works exactly as in your book. The methodical approach; introducing things in a sensible order with clear instructions as to what to do; how things should look on the screen, and; what is the most likely cause of things going wrong, is very helpful.

Thanks again for your reply.
 
Old May 22nd, 2015, 04:38 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

>> I'm rather loath to clear my cookies/history etc. as there are a couple of important sites I visit that this messes up quite a bit

Browsers like Firefox allow you to remove cookies and cache for a single domain (localhost in your case) only.

>> the methodical approach; introducing things in a sensible order with clear instructions as to what to do; how things should look on the screen, and; what is the most likely cause of things going wrong, is very helpful.

Great, good to hear you find the book so helpful. Spread the word, spread the word.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
After Beginning ASP.NET 4.5 : in C# and VB Thermopyle BOOK: Beginning ASP.NET 4.5 : in C# and VB 27 March 30th, 2013 01:14 AM
What after Beginning ASP.NET 4 in C# and VB? sulix BOOK: Beginning ASP.NET 4 : in C# and VB 3 March 21st, 2011 03:47 AM
Can'T find code to Beginning Asp.net using VB.NET darruler All Other Wrox Books 1 August 12th, 2004 05:04 PM
Help 'beginning asp.net using vb.net' source code jkmf Wrox Book Feedback 1 January 18th, 2004 08:09 AM
Beginning ASP.Net Databases Using VB.Net ISBN 6195 tlamazares SQL Server ASP 1 December 15th, 2003 01:28 PM





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