0

I am working on asp.net web form application, in register page, autopostback does not work properly in safari browser, I found solution but i want to understand

string ua = Request.UserAgent;
if (ua != null
    && (ua.IndexOf("iPhone", StringComparison.OrdinalIgnoreCase) >= 0
    || ua.IndexOf("iPad", StringComparison.OrdinalIgnoreCase) >= 0
    || ua.IndexOf("iPod", StringComparison.OrdinalIgnoreCase) >= 0)
    && ua.IndexOf("Safari", StringComparison.OrdinalIgnoreCase) > 0)
{
    this.ClientTarget = "uplevel"; // what does this mean?
}

Please explain me what is meaning of uplevel.

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

diiN__________
  • 7,393
  • 6
  • 42
  • 69
Ankit Rana
  • 383
  • 6
  • 24

1 Answers1

0

From MSDN:

ClientTarget property gets or sets a value that allows you to override automatic detection of browser capabilities and to specify how a page is rendered for particular browser clients.

  • uplevel, which specifies browser capabilities equivalent to Internet Explorer 6.0.

So in your case: With this.ClientTarget = "uplevel" you are making sure your application runs properly in your Safari browser.

Community
  • 1
  • 1
diiN__________
  • 7,393
  • 6
  • 42
  • 69
  • but my condition is totally different from actual code :http://stackoverflow.com/questions/12804493/safari-on-ipad-occasionally-doesnt-recognize-asp-net-postback-links – Ankit Rana Aug 30 '16 at 10:44