Usuário com melhor resposta
Erro no RequiredFieldValidator

Pergunta
-
Erro no na minha pagina.aspx quando coloco o RequiredFieldValidator no Visual Studio 2012 Express
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="server">
<asp:Panel runat="server" ID="pnlCadastro" Visible="true">
<h1>Cadastro de Produtos</h1>
<ul>
<li>
<asp:Label ID="Label2" runat="server" Text="Descrição"></asp:Label>
<asp:TextBox ID="tbDescriao" CssClass="radiusInput" style="text-transform:uppercase;" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ErrorMessage="Descrição do Produto não pode ficar em branco" ControlToValidate="tbDescriao" Width="16px">*</asp:RequiredFieldValidator>
</li>
<li>
<asp:Label ID="Label3" runat="server" Text="Data de Cadastro"></asp:Label>
<asp:TextBox ID="tbDataCadastro" CssClass="disable radiusInput" Enabled="false" runat="server"></asp:TextBox>
</li>
<li>
<asp:Button ID="btnCadastrar" CssClass="btnAdd btn" OnClick="btnCadastrar_Click" runat="server" Text="Cadastrar" />
</li>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
</ul>
</asp:Panel>
</asp:Content>Server Error in '/' Application
WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
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.InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
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:[InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).] System.Web.UI.ClientScriptManager.EnsureJqueryRegistered() +2894757 System.Web.UI.WebControls.BaseValidator.RegisterUnobtrusiveScript() +11 System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +9686929 System.Web.UI.Control.PreRenderRecursiveInternal() +88 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Control.PreRenderRecursiveInternal() +160 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +985
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.57.0- Editado ricardoti2012 quarta-feira, 8 de julho de 2015 11:43
Respostas
-
Bom dia Paulo,
Tudo bem?
Bem, o erro informa o seguinte:
WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'.Please add a ScriptResourceMapping named jquery(case-sensitive).
Eu dei uma olhada e encontrei um artigo que segue neste link uma informação similar que talvez possa te ajudar. Além disso também encontrei esta outra possível solução.
Espero ter ajudado.
Atenciosamente
Marcos Robertto
- Editado Mr. Morello quarta-feira, 8 de julho de 2015 12:20
- Editado Marcos SJ quinta-feira, 9 de julho de 2015 20:15 Correção
- Marcado como Resposta ricardoti2012 terça-feira, 14 de julho de 2015 20:03