CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2006
    Posts
    5

    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!

  2. #2

    Re: server.Transfer error on web part

    Use a capital S, ie Server.Transfer()...

  3. #3
    Join Date
    Mar 2006
    Posts
    5

    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?)"

  4. #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.

  5. #5
    Join Date
    Mar 2006
    Posts
    5

    Re: server.Transfer error on web part

    Quote 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
  •  





Click Here to Expand Forum to Full Width

Featured