[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 659
  • Last Modified:

ASP.NET iPad Development - Help needed with Materpages and Postback

I'm working on an .NET/HTML5/CSS3 application and I'm running into a bit of a snag.

I have navigation buttons on my Masterpage.  When I launch my application from the home screen icon and navigate around for a bit, everything seems to be work fine.  However, if the application is idol for for a minute or so the buttons in the Masterpage stop working.  

Any ideas how to fix this?
0
cdemott33
Asked:
cdemott33
1 Solution
 
cdemott33Author Commented:
I found the answer myself so I'm going to post it here in hopes it helps someone else who is having this problem.

On each asp.net page (not the MasterPage) you need to drop-in this piece of code:

    Protected Sub Page_PreInit(sender As Object, e As System.EventArgs) Handles Me.PreInit
        If Request.UserAgent IsNot Nothing AndAlso Request.UserAgent.IndexOf("AppleWebKit", StringComparison.CurrentCultureIgnoreCase) > -1 Then
            Me.ClientTarget = "uplevel"
        End If
    End Sub

You can read more about this issue here:

http://blog.lavablast.com/post/2011/05/29/Gotcha-iPad-versus-ASPNET.aspx
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now