Jquery validations on dynamic controls are not getting fired when i use a groupdoc Viewer control on the page

Hi,



So I have a page in which I have few dynamic controls and the validations were getting fired properly then I Included the groupdoc viewer control in this page and suddenly the validations stop getting fired.



can you please help me resolve this issue at the earliest.

Hello,


We are sorry to hear that you have such issue. Thank you for the example but since you have allot of including 3rd party JavaScript files and libraries in your web page we can’t run it with out all these libraries. Please share with us full project example that we can run it and reproduce the issue.

Thank you.

Hello,


In addition to previous post. From your code we can see that you use
<%= Viewer.CreateScriptLoadBlock().LoadJquery(true).LoadJqueryUi(true).UseHttpHandlers() %>
in the “body” section and also you have included your own jQuery and jQuery UI libs. Please move this code line to the head section. Also please use only one jQuery and jQuery UI libs (from GroupDocs.Viewer or your own).

To disable GroupDocs jQuery update this code line in such way:
<%= Viewer.CreateScriptLoadBlock().LoadJquery(false).LoadJqueryUi(false).UseHttpHandlers() %>

Or remove your jQuery libs including.

Best regards.

Hi Pavel,



Thanks for the reply but when I put the section in Head section I get below error that’s why I placed it in Body section , any suggestions why this is happening -





Server Error in ‘/’ Application.



The Controls collection cannot be modified because the control contains code blocks (i.e. ).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. ).



Source Error:





An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.



Stack Trace:







[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. ).]

System.Web.UI.ControlCollection.Add(Control child) +9871679

System.Web.UI.PageTheme.SetStyleSheet() +301

System.Web.UI.Page.OnInit(EventArgs e) +9674896

System.Web.UI.Control.InitRecursive(Control namingContainer) +134

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489





In continuation to above , please find attached error details.

Hello,


This issue is a known issue of the ASP.NET and do nothing with the GroupDocs. To found out how to resolve this issue please investigate this article .

Best regards.