0

I've trying to follow this example.

There's one problem im facing is whenever im at the Login.aspx page or being redirected to there, my CSS styles does not show up. Only when i logged in successfully and when it redirect to default.aspx my css style is showing up properly.

Any ways to get my CSS working properly?

Update #1:

I've managed to add the to the webconfig like this:

  <location path="Styles/style.css">
    <system.web>
      <compilation debug="true" targetFramework="4.5"/>
      <httpRuntime targetFramework="4.5"/>
      <authentication mode="Forms">
        <forms name=".ASPXUSERDEMO" loginUrl="Login.aspx" protection="None" timeout="60"/>
      </authentication>
      <authorization>
        <deny users="?"/>
      </authorization>
      <globalization requestEncoding="UTF-8" responseEncoding="UTF-8"/>
    </system.web>
  </location>

But one issue is my pages are not longer secured by forms authentication anymore. How can i fix it? thanks!

2
  • Please add CSS for both pages or create a master page and add style for it. Commented Feb 27, 2015 at 10:19
  • Yes my master page is linked to my Styles/Styles.css , all other pages will will work fine once i've logged in. Its only before i log on the Login.aspx my css style file is not formatting the page at all. It feels like it is not allowing me to access my css file before authentication. How can i allow it? Commented Feb 27, 2015 at 16:39

1 Answer 1

1

Try to add css with relevant tags:
Example: add this part after html tag : http://pastebin.com/jxFsG5xc

<style type="text/css">
        h3 {
            font-family:Verdana;
        }
        #Msg {
             font-family:Verdana;
             color:red;
        }
</style>

css tutorials - http://www.w3schools.com/css/

Sign up to request clarification or add additional context in comments.

3 Comments

Yes my master page is linked to my Styles/Styles.css , all other pages will will work fine once i've logged in. Its only before i log on the Login.aspx my css style file is not formatting the page at all. It feels like it is not allowing me to access my css file before authentication. How can i allow it?
Better to share the code,then I can check it.use google drive.
Hi Jimmer, i've updated with my latest code above but my pages not longer secured by forms authentication. thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.