asp.net - .net, Login.aspx, can't display <img> tag? -


I'm actually following a tutorial about creating a login page for a web project and so on. All this works and now I am working on layout. I've added an image tag on my login page, as simple as possible, the src is correct, the image is definitely there, but the image will not appear on the page, why ??

The image works if I copy the tag and paste it into another page in the project, but log in. No espx page!

I should be suffering from 'lack of brain Friday syndrome' because it stumped me! Maybe I should see that I can get half day and go home ...

Thank you.

code:

  & lt;% @page language = "c #" autoevolutionwireup = "true" codebahind = "login. Espx c." Inherits = "SM_Element.login"%> & Lt ;; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; Login page & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; Img src = "images / redflag.png" style = "width: 1024px; height: 893px; limit: none; padding: 0px;" Alt = "alt" /> Username & lt; Br / & gt; & Lt; ASP: Text Box ID = "Text Box 1" Runat = "Server" & gt; & Lt; / Asp: text box & gt; & Lt; Br / & gt; Password & lt; Br / & gt; & Lt; ASP: Text Box ID = "Textbox2" Runat = "Server" SystemType = "Password" & gt; & Lt; / Asp: text box & gt; & Lt; Br / & gt; & Lt; ASP: Button ID = "Button 1" onclic = "Button 1_Click" runat = "server" text = "submit" /> & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Therefore, I added the following to my web.config file under the file, which documents any person should enter the Pictures folder regardless of whether they are logged in or not:

  & lt ;! - This section grants unauthorized users access to all files stored in the Image Files folder. - & gt; & Lt; Location Path = "Picture" & gt; & Lt; System.web & gt; & Lt; Authority & gt; & Lt; Allow users = "*" /> & Lt; / Authorization & gt; & Lt; /system.web> & Lt; / Location & gt; I'm really going to change it in the future and reconstruct it so that the necessary images for pages like login etc. are available to everyone and all else is preserved. 

Verify that the image is not in a location that is locked. You say that you can work on other pages, but do you need to log in to those pages? If so, the fact that you are logged in gives those pages the ability to show the image. When your login screen is not logged in, the picture directory can be safe and therefore it is not viewable.

Your web Configured everything possibly from the root so that you may need it to enter your 'Images' directory.

Do you have login.aspx in the root and have moved all your secure codes to a sub directory, make sure that you have your web Configure the config file correctly.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -