c# - Problem with loading CSS while invoking page by Server.Transfer() -


while i'm using response.redirect("~/pages/page.aspx"), style loaded on page, unfortunately not loaded while i'm using server.transfer("~/pages/page.aspx") method.

the page looks following:

<html> <head runat="server">    <link href="../css/layout/style.css" type="text/css" rel="stylesheet" /> </head> <body></body> </html> 

how make page load style.css using server.transfer() ?

regards

the problem use relative path css file, should use abolute path.

if css folder inside application root, can use

<html> <head runat="server">    <link href="/css/layout/style.css" type="text/css" rel="stylesheet" /> </head> <body></body> </html> 

or even

<html> <head runat="server">    <link href="~/css/layout/style.css" type="text/css" rel="stylesheet" runat="server" id="auniqueid" /> </head> <body></body> </html> 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -