Solved

Server.Transfer + CSS

Posted on 2003-10-21
2
469 Views
Last Modified: 2009-09-03
Hi,
I'm using Server.Transfer (with VB.Net in the code-behind) to send info to a new page, but when the new page is loaded all of the CSS info is missing (meaning that no styles are applied).  A click on any of the controls in the new page posts-back and styles are applied again, just as I expected them to be the first time...does anyone know why styles fail to apply on the initial transfer to the new page?

Thanks in advance,
Headspace
0
Comment
Question by:Headspace
2 Comments
 
LVL 23

Accepted Solution

by:
naveenkohli earned 125 total points
ID: 9593704
Server.Transfer does not modify the URL. It is still the same as the page that initialted the request. So if

http://localhost/Page1.aspx 

calls Server.Transfer("Folder1/Page2.aspx")

The URL location will still be http://localhost/Page1.aspx

So if your CSS file location is some relative path to some folder that is not in the same folder as Page2.aspx, then it can't load.
0
 
LVL 9

Author Comment

by:Headspace
ID: 9598575
Great! Thanks!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now