473,320 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CSS Formatting not appearing on Login page

Hi,

I have an app which utilizes forms security. I have a Login.aspx page
which references my MasterPage.master. The master page in turn
references a css.

In the designer of VS 2005, the Login page renders correctly.... with
correct formatting as provided by my css.

At application runtime however, all formatting disappears on the login
page... no css formatting occurs at all.

Note that other pages in the app (ie. subsequent to login) appear
correctly formatted. This is puzzling!

Another hint : this was all working until I created a sub-directory
under the root of the app & moved web pages to there.

My ide is VS 2005 (completely up to date version).

Any ideas ?

Thanks,
Bazza

Mar 11 '07 #1
11 3849
On Mar 11, 8:32 pm, "Bazza Formez" <bruce_for...@clear.net.nzwrote:
Hi,

I have an app which utilizes forms security. I have a Login.aspx page
which references my MasterPage.master. The master page in turn
references a css.

In the designer of VS 2005, the Login page renders correctly.... with
correct formatting as provided by my css.

At application runtime however, all formatting disappears on the login
page... no css formatting occurs at all.

Note that other pages in the app (ie. subsequent to login) appear
correctly formatted. This is puzzling!

Another hint : this was all working until I created a sub-directory
under the root of the app & moved web pages to there.

My ide is VS 2005 (completely up to date version).

Any ideas ?

Thanks,
Bazza
Do you use an absolute path with slash at beginning to CSS?

e.g.

<link type="text/css" href="/style.css" rel="stylesheet">
Mar 11 '07 #2
Hi Alexey,

Thanks for your reply.

The code I had was :
<link href="styles.css" rel="stylesheet" type="text/css" />

(By the way ... The css is in the same directory as the masterpage.)

I have tried the following using an absolute path ....
<link href="~/mydirectory/styles.css" rel="stylesheet" type="text/
css" />

But this also gave same problem..

Any other ideas Alexey ?

Many thanks,
Bazza

Mar 11 '07 #3
Hi Alexey,

Thanks for your reply.

The code I had was :
<link href="styles.css" rel="stylesheet" type="text/css" />

(By the way ... The css is in the same directory as the masterpage.)

I have tried the following using an absolute path ....
<link href="~/mydirectory/styles.css" rel="stylesheet" type="text/
css" />

But this also gave same problem..

Any other ideas Alexey ?

Many thanks,
Bazza

Mar 11 '07 #4
On Mar 11, 9:03 pm, "Bazza Formez" <bruce_for...@clear.net.nzwrote:
I have tried the following using an absolute path ....
<link href="~/mydirectory/styles.css" rel="stylesheet" type="text/
css" />
This is wrong. The tilda-prefix "~" can be used for server-side
controls only.

So, please try

<link href="/mydirectory/styles.css" ....

If this still doesn't work, check if it's not the cache problem.
Refresh the login page with Ctrl+F5, or delete all cached files.

Mar 11 '07 #5
Thanks.

(In masterpage) I changed it to :

<link href="/mydirectory/styles.css" rel="stylesheet" type="text/css" /
...
still same prob.

Note that all other pages in site using same masterpage work fine....
Can you tell me where cached files live please ?

thanks,
Bazza

Mar 11 '07 #6
On Mar 11, 9:34 pm, "Bazza Formez" <bruce_for...@clear.net.nzwrote:
Thanks.

(In masterpage) I changed it to :

<link href="/mydirectory/styles.css" rel="stylesheet" type="text/css" /
...

still same prob.
So, let's check:

1. login.aspx used a master
2. login.aspx, masterpage, styles.css are in the same directory
(mydirectory)
3. site has the following structure:

root
------mydirectory
---------------login.aspx
---------------masterpage
---------------styles.css
---------------others

>
Note that all other pages in site using same masterpage work fine....

Can you tell me where cached files live please ?
You can remove the IE cache from menu (Tools - Internet Options,
Browsing History...). IE has a problem with caching the CSS and maybe
you cannot see the style because of this problem. Maybe you can try to
restart the web server.

Mar 11 '07 #7
I deleted cache.. no luck there.

1. yes, login.aspx uses the master page
2. login.aspx, master page * styles.css all in same directory
3. My directory structure is just as you have described....

Full structure (in case it helps) is :

root
-----web.config
-----web.sitemap
-----App_Code (asp.net folder)
---------------BLL directory
---------------DAL directory
-----App_Data (asp.net folder)
---------------mydb.mdb
-----MyDirectory directory
---------------styles.css
---------------masterpage.master
---------------login.aspx
---------------other aspx pages

Mar 11 '07 #8
On Mar 12, 10:42 am, "Bazza Formez" <bruce_for...@clear.net.nzwrote:
I deleted cache.. no luck there.

1. yes, login.aspx uses the master page
2. login.aspx, master page * styles.css all in same directory
3. My directory structure is just as you have described....

Full structure (in case it helps) is :

root
-----web.config
-----web.sitemap
-----App_Code (asp.net folder)
---------------BLL directory
---------------DAL directory
-----App_Data (asp.net folder)
---------------mydb.mdb
-----MyDirectory directory
---------------styles.css
---------------masterpage.master
---------------login.aspx
---------------other aspx pages
By the way, all was working ok until I added the My directory level
into the mix and & moved web pages, master & styles.css into that.

Mar 11 '07 #9
On Mar 11, 10:46 pm, "Bazza Formez" <bruce_for...@clear.net.nzwrote:
On Mar 12, 10:42 am, "Bazza Formez" <bruce_for...@clear.net.nzwrote:


I deleted cache.. no luck there.
1. yes, login.aspx uses the master page
2. login.aspx, master page * styles.css all in same directory
3. My directory structure is just as you have described....
Full structure (in case it helps) is :
root
-----web.config
-----web.sitemap
-----App_Code (asp.net folder)
---------------BLL directory
---------------DAL directory
-----App_Data (asp.net folder)
---------------mydb.mdb
-----MyDirectory directory
---------------styles.css
---------------masterpage.master
---------------login.aspx
---------------other aspx pages

By the way, all was working ok until I added the My directory level
into the mix and & moved web pages, master & styles.css into that.- Hide quoted text -

- Show quoted text -
I have really no idea what's wrong here.

Open your http://localhost/MyDirectory/login.aspx with no style, right
click - View Source. Check what was generated by ASP.NET. Make sure
that it is

<link href="/MyDirectory/styles.css" ...

Make sure that there no other CSS styles in use and HTML layout is
correct.

Try to save the source as a separated HTML file, e.g.
http://localhost/MyDirectory/login.htm to see if this work properly
with CSS in IE and in VS.NET.

Hope, it helps...

Mar 11 '07 #10
On Mar 12, 11:01 am, "Alexey Smirnov" <alexey.smir...@gmail.com>
wrote:
On Mar 11, 10:46 pm, "Bazza Formez" <bruce_for...@clear.net.nzwrote:


On Mar 12, 10:42 am, "Bazza Formez" <bruce_for...@clear.net.nzwrote:
I deleted cache.. no luck there.
1. yes, login.aspx uses the master page
2. login.aspx, master page * styles.css all in same directory
3. My directory structure is just as you have described....
Full structure (in case it helps) is :
root
-----web.config
-----web.sitemap
-----App_Code (asp.net folder)
---------------BLL directory
---------------DAL directory
-----App_Data (asp.net folder)
---------------mydb.mdb
-----MyDirectory directory
---------------styles.css
---------------masterpage.master
---------------login.aspx
---------------other aspx pages
By the way, all was working ok until I added the My directory level
into the mix and & moved web pages, master & styles.css into that.- Hide quoted text -
- Show quoted text -

I have really no idea what's wrong here.

Open yourhttp://localhost/MyDirectory/login.aspxwith no style, right
click - View Source. Check what was generated by ASP.NET. Make sure
that it is

<link href="/MyDirectory/styles.css" ...

Make sure that there no other CSS styles in use and HTML layout is
correct.

Try to save the source as a separated HTML file, e.g.http://localhost/MyDirectory/login.htmto see if this work properly
with CSS in IE and in VS.NET.

Hope, it helps...- Hide quoted text -

- Show quoted text -
Thanks so much for your help Alexey. I very much appreciate it.

Mar 12 '07 #11
OK.. problem now solved.

It turns out that the permissions were all wrong. Using the security
settings of the website administration tool I was able to correct
access permissions to directories such that CSS file was no longer
protected to a user that had not yet logged on.

Mar 12 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: GreggTB | last post by:
I've got an page (LOGIN.ASPX) that receives the user's login information. During the page load, it checks the credentials against a database and, if validation is successful, creates an instance of...
3
by: Dam6 | last post by:
Okay... Using vb .net within DW MX2004, connecting to an access database: Background: I have created a simple login.aspx page that is supposed to re-direct to default.aspx using...
7
by: Alan Silver | last post by:
Hello, Sorry this is a bit wordy, but it's a pretty simple question... I have a web site, http://domain/ which is a public site, part of which (http://domain/a/) is protected by forms...
2
by: kumag | last post by:
hi, i'm having this problem with export in asp. the export seems to be working fine but what's appearing is the login page for my web app. i'm using form security, username/password authentication...
2
by: Sasquatch | last post by:
I'm having trouble creating a simple login page using the asp:login control. I followed some instructions in a WROX book, "Beginning ASP.NET 2.0," and the instructions are very straight forward,...
4
tolkienarda
by: tolkienarda | last post by:
Hi all I work for a small webdesign company and we have remote hosting. i built a mysql database with phpmyadmin on the server. i then downloaded and modified a php login page. i am continuing to...
2
by: dgbergman | last post by:
I have created a php login page in my site for my company. The goal is to get people into members area. Below is a list of steps that I take to create my login page in Dreamweaver CS3, can some one...
9
by: adweaver | last post by:
Hello All, I'm new to the world of php. I've just had a site designed for me by a company, and I'm now trying to manage and grow it, so it will suit my needs. The site was built in a folder...
21
by: tvnaidu | last post by:
This is the Java script I am using fo rlogin page, but cursor not pointing to login box, any idea how can I point cursor to login box when this page loaded?. here admin login take to control page and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.