Click to See Complete Forum and Search --> : server.Transfer error on web part
Phyxsiuss
March 26th, 2006, 09:01 PM
Hi! I'm new to C# and I am currently creating a page that transfers to another page. I've read the other forums and articles about using server.Transfer when opening another page. But when I compile my code, it states that "The type or namespace name 'server' could not be found (are you missing a using directive or an assembly reference?)"
What should I do to remove this error? Thanks!
mmetzger
March 26th, 2006, 10:14 PM
Use a capital S, ie Server.Transfer()...
Phyxsiuss
March 26th, 2006, 11:59 PM
hi! I 've tried replacing server with Server but it resulted to an error :
"The type or namespace name 'Server' could not be found (are you missing a using directive or an assembly reference?)"
mmetzger
March 27th, 2006, 09:28 AM
Where are you putting this code - inline, code behind, etc?
Depending on how you initiated this page, the references may not be set correctly.
You'll need a dll reference to System.Web, then the actual Server.Transfer uses System.Web.HttpServerUtility.Transfer. The Server is an object setup by ASP.NET during runtime.
Phyxsiuss
March 27th, 2006, 08:51 PM
Where are you putting this code - inline, code behind, etc?
Depending on how you initiated this page, the references may not be set correctly.
You'll need a dll reference to System.Web, then the actual Server.Transfer uses System.Web.HttpServerUtility.Transfer. The Server is an object setup by ASP.NET during runtime.
code-behind. (web part)
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.