[Mono-bugs] [Bug 59149][Wis] New - Server.Transfer does not work.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 26 May 2004 23:21:30 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by tracy@aic.net.au.


--- shadow/59149	2004-05-26 23:21:30.000000000 -0400
+++ shadow/59149.tmp.22235	2004-05-26 23:21:30.000000000 -0400
@@ -0,0 +1,55 @@
+Bug#: 59149
+Product: Mono: Class Libraries
+Version: unspecified
+OS Details: Mandrake 9.2
+Status: NEW   
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tracy@aic.net.au               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Server.Transfer does not work.
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Server.Transfer does not work. If I pass a string value to it ie;
+Server.Transfer("somepage.aspx") it returns the following error "Cannot
+cast from source type to destination type."
+Steps to reproduce the problem:
+1. Create a page called testpage.aspx, with a linkButton on it.
+2. in the code behind  - in the LinkButtons Click event handler add the
+following code Server.Transfer("destinationpage.aspx");
+3. Create a second page named destinationpage.aspx
+4. Compile and run, loading testpage.aspx.
+5. Click on the link on testpage.aspx
+Actual Results:
+a .NET error message the gist of which is "Cannot cast from source type to
+destination type."
+Expected Results:
+destinationpage.aspx will load
+How often does this happen? 
+everytime I attempt to use Server.Transfer.
+Additional Information:
+The only work around appears to be to use