I'm developing an ASP.NET Webform website using .NET Framework 4.6, C# and Javascript,
I've used HiddenField to store a value from a navigation drawer, then do a postback to update value in UpdatePanel, but seem that the code stucked at __doPostBack() on iOS, iPadOS browsers (all Safari, Chrome, Firefox), for Windows browsers everything works fine. Below is my Javascript code:
function headChange(e) {
__doPostBack('<%=HiddenField1.ClientID%>', '');
};
I tried several methods found on Internet such as:
- Added
<browserCaps userAgentCacheKeyLength="256"/>
in web.config - Added
return false;
after__doPostBack('<%=HiddenField1.ClientID%>', '');
- Replace
__doPostBack('<%=HiddenField1.ClientID%>', '');
by<%= Page.ClientScript.GetPostBackEventReference(HiddenField1, String.Empty) %>;
- Added a browser file to App_Browsers folder
but all with no luck,
Has anyone encountered the same problem and found the solution for this? Thank you very much!