none
jQuery referred twice

    General discussion

  • Hi All,

    I have created a simple web application. In this, I have added a simple text box and added the validation for the textbox in one of its child page. I referred the jQuery script file in the head section of site.master page.

    I have added nothing more than this.

    when i run this application, through developer tools i have found that jQuery once again referred in the body section of the page.

    But if I removed the validation (<asp:RequiredFieldValidator runat="server">) tag, now i see that only one jQuery referred which is the jQuery script file that i have added in the head section of master page.

    ISSUE OCCURS (additional jQuery appended) when i have added the validation tag.

    Can you tell me the reason, why jQuery referred in body section even jQuery is not referred in the body section of site.master page?

    Please help to get out of this problem.

    Regards,

    Francis

    Thursday, August 18, 2016 11:55 AM

All replies

  • Hi Francis,

    According to your description, I validate this issue in my Visual Studio and get the same result.

    And I analysis the RequiredFieldValidator control with Developer Tool in IE, I found that it has a data-val-evaluationfunction property and it used a function named "RequiredFieldValidatorEvaluateIsValid". I think this function coms from JQuery. This is why it will reference JQuery in Body by default.

    But I also think it is not applicable add it in Body by default and no matter we reference JQuery in head section or not, it should reference based on the content that have referenced in head section.

    I suggest you submit this issue to Visual Studio Connect and share the feedback link here. I will vote and add comments for this issue. It also could let other communities who has the same issue to vote and add comments. Thanks for your feedback.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 19, 2016 6:18 AM
    Moderator
  • Hi Weiwei,

    Thanks for your reply.

    As per your suggestion, I have submitted the issue (https://connect.microsoft.com/VisualStudio/feedback/details/3064963/jquery-referred-twice)

    I will be more happy,  if i know what is the root cause of this issue. Hope developer team helps in this issue.

    Thanks!

    Francis

    Monday, August 22, 2016 9:53 PM
  • Hi Francis,

    Thanks for your feedback. I have vote it.

    If any questions about Visual Studio IDE in future, please feel free to come back.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, August 23, 2016 6:51 AM
    Moderator