Microsoft KB Archive/310481

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

Article ID: 310481

Article Last Modified on 6/14/2002

-

APPLIES TO


 * Microsoft Mobile Internet Toolkit 1.0

-



This article was previously published under Q310481



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.

Keywords: kbnofix kbnavigation kbprb KB310481

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.