Article ID: 310481 - Last Review: June 14, 2002 - Revision: 1.0

PRB: Errors Are Generated When You Use Redirects in Mobile Web Forms Pages

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q310481
Expand all | Collapse all

SYMPTOMS

When you use the Response.Redirect method in a mobile Web Forms page, you may receive the following error message:
Calling Response.Redirect on a postback can have unpredictable results on mobile devices and gateways. Use MobilePage.RedirectToMobilePage method instead.
When you are browsing to or compiling a page that contains the MobilePage.RedirectToMobilePage method, you may receive the following error message:
CS0120: An object reference is required for the nonstatic field, method, or property 'System.Web.UI.MobileControls.MobilePage.RedirectToMobilePage(string)'

RESOLUTION

To resolve this issue, use the following syntax:

Microsoft Visual Basic .NET
Me.RedirectToMobilePage(url)
				
Microsoft C# .NET
this.RedirectToMobilePage(url);
				

STATUS

This behavior is by design.

APPLIES TO
  • Microsoft Mobile Internet Toolkit 1.0
Keywords: 
kbnavigation kbnofix kbprb KB310481
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.