Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 18th, 2003, 08:22 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with Server.Transfer and Codebehind

Hi,
I've got a webapp which are programmed with c# as codebehind. In the webapp I've go 2 aspx. One as the startpage and a second which will be opened when some special action is driven on the 1st page. When the second page is opened some POST-Data have to be transfered from the 1st to the 2nd. For that reason I'm using the function Server.Transfer in my c#-eventhandler. But if i do so I've got following error message:
Code:
The XML page cannot be displayed 
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

A string literal was expected, but no opening quote character was found. Error processing resource 'http://localhost/LogAWebReport/WebReport.aspx'. Line 2, Position 63 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
--------------------------------------------------------------^
my code for calling the page is:
Code:
 String sXmlSel = "<selection>";

        //read the owner node
        XmlNode nodeOwner = xmlDoc.SelectSingleNode( "//owner" );
        sXmlSel += nodeOwner.OuterXml;

        //read the report node
        XmlNode nodeReport = xmlDoc.SelectSingleNode( "//report" );
        sXmlSel += nodeReport.OuterXml;

        sXmlSel += "</selection>";

        XmlDocument xmlSel = new XmlDocument( );
        xmlSel.LoadXml( sXmlSel );


        Response.ContentType = "text/xml";


        //Response.Redirect( "http://localhost/LogAWebReport/WebForm1.aspx?Type=Redirect" );
        Server.Transfer( "Test.aspx" );
Does anyone knows what could be wrong?

Thanks in Advance

Markus

P.S Test.aspx is an empty page like it is generated from VS.NET 2002





Similar Threads
Thread Thread Starter Forum Replies Last Post
Server.Transfer Sheraz Khan ASP.NET 2.0 Basics 1 July 28th, 2007 05:17 AM
Transfer Data from one server to another server Jane SQL Server 2000 2 February 28th, 2005 03:15 AM
ViewState with Server.Transfer Aaron Edwards Classic ASP Basics 3 January 2nd, 2005 07:52 PM
SSL and server.transfer shs BOOK: Beginning ASP.NET 1.0 2 September 1st, 2004 09:58 PM
Server.Transfer Not Working sg48 ASP.NET 1.0 and 1.1 Basics 1 June 21st, 2003 10:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.