LinkButton PostBack not working on Chrome Mobile?
Little note for Coinstar money transfer me and other mobile developers who may find this post. Here the fix.
ASPX file:
<asp:LinkButton ID="SendButton" runat="server" ClientIDMode="Static">Send</asp:LinkButton>
Code Behind file (.aspx.cs):
protected override void OnPreInit(EventArgs e)
{
if (Request.UserAgent != null && (Request.UserAgent.IndexOf("AppleWebKit") > 0)) // added for compatibility issues with chrome
{
this.ClientTarget = "uplevel";
}
base.OnPreInit(e);
}
protected void Page_Load(object sender, EventArgs e)
{
SendButton.Click += new EventHandler(SendButton_Click);
}