Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > Visual Web Developer 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual Web Developer 2005 Discuss creating ASP.NET 2.0 sites with Microsoft's Visual Web Developer 2005. If your question is more specific to a piece of code than the Visual tool, see the ASP.NEt 2.0 forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2005 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 Display Modes
  #1 (permalink)  
Old September 21st, 2011, 05:51 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Unhappy Membership - Css doesn't get applied to login page

Hi,

I have started making a very simple login system. I have created a Login page & also a Css. I have applied the Css to Login Page. I have also created rules that only the authenticated users can enter the site or else they will be redirected to Login page.

When i run the default.aspx page directly without logging, it redirects me to the Login page which is ok, but the style sheet is not getting applied to Login page all colors are vanished & i can see just plain text.

I applied it in this way :-
<link href="Style.css" rel="stylesheet" type="text/css" />

The code seems to be correct. The sytle sheet also is correct as it works in all other pages, then why doesn't it get applied to login page.

Help Me Please.

Thanks....!!
Reply With Quote
  #2 (permalink)  
Old September 21st, 2011, 06:26 AM
Imar's Avatar
Wrox Author
Points: 67,071, Level: 100
Points: 67,071, Level: 100 Points: 67,071, Level: 100 Points: 67,071, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,197
Thanks: 65
Thanked 1,404 Times in 1,384 Posts
Default

Are you blocking access to all pages in your site? If so, access to the style sheet is blocked as well.

Add a <location> element to the root of your config file and set its path to your style sheet file or folder. Then set up security to allow anonymous users to access that content.

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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
anup.maverick (September 21st, 2011)
  #3 (permalink)  
Old September 21st, 2011, 06:52 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Default

Hi,

Wow..It works. I added the following code in my web.config file:-

<location path="Style.css">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

Thank U....!!
Reply With Quote
Reply


Thread Tools
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
questions on Membership and auto login markpisc BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 6 March 26th, 2009 10:40 AM
Custom Membership Provider and Login Control sonishpaul ASP.NET 2.0 Professional 2 December 14th, 2007 01:36 PM
CSS not get applied in CR Export functionality skdevre Crystal Reports 0 April 10th, 2007 02:38 AM
Using Access Databases for Login and Membership rodgerpb ASP.NET 2.0 Basics 0 November 19th, 2006 04:58 PM
Simple ASP.NET Membership Provider Login jumpseatnews ASP.NET 2.0 Basics 0 July 16th, 2006 10:53 AM



All times are GMT -4. The time now is 02:50 AM.


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