Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Server.Transfer + CSS

Posted on 2003-10-21
2
Medium Priority
?
483 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 500 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

824 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