|
-
March 26th, 2006, 10:01 PM
#1
server.Transfer error on web part
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!
-
March 26th, 2006, 11:14 PM
#2
Re: server.Transfer error on web part
Use a capital S, ie Server.Transfer()...
-
March 27th, 2006, 12:59 AM
#3
Re: server.Transfer error on web part
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?)"
-
March 27th, 2006, 10:28 AM
#4
Re: server.Transfer error on web part
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.
-
March 27th, 2006, 09:51 PM
#5
Re: server.Transfer error on web part
 Originally Posted by mmetzger
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|