.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

jquery validation error message - place in the specified div whose class is putmehere !

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :ASP.Net


I decided to use jquery validations because asp.net validation controls are so crazy inside the update panel.

But I need to plase the error messages in the specified div whose class is putmehere ! I am unable to do that. here is my code;

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <script src="../JQuery/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="../JQuery/Validation/jquery.validate.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
                rules: {
                    <%=TextBox1.UniqueID %>: {
                        minlength: 2,
                        required: true
                     <%=TextBox2.UniqueID %>: {                       
                        required: true,
                }, messages: {
                    <%=TextBox1.UniqueID %>:{
                        required: "* Required Field *",
                        minlength: "* Please enter atleast 2 characters *"

View Complete Post

More Related Resource Links

Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





Adding New Error Message to Validation Summary Control



 In the code behind based on a condition i want to add a error message to the Validation Control.

 I tried the below.

 'Call function to add error message.
protected void AddErrorToValidationSummary(string errorMessage)
 CustomValidator custVal = new CustomValidator();   
 custVal.IsValid = false;   
 custVal.ErrorMessage = errorMessage;  
 custVal.EnableClientScript = false;   
 custVal.Display = ValidatorDisplay.None;        



Page IS Valid Validation Error and Message Box Pops up twice which is annoying???




i have a create User Wizard with a Custom Template so I can grab more information from the user who is

registering on my page.  When they click the submit button a window modal popup extender pops up using Javascript code to

show them the Form is being processed.


createUserWizard Submit Button

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  OnClientClick="ShowMP();" align="middle" CausesValidation="False"
                                            Text="Submit my Profile"  />


Javascript code<

JQuery Validation Plugin Error


I have added method in JQuery Validation which is working in FireFox but it is giving error in IE. Can somebody tell what can be the Problem. After adding companyNameCheck method it is giving error.

This is my JQuery Script

        $("#btnValidate").click(function () {
              required: true,
              companyNameCheck: true
             required: "Provide Company Name" ,
             companyNameCheck: "Company already exits"
            success: function (label) {
              // set   as text for IE 
              label.html(" ").addClass("positive");
            errorPlacement: function (error, element) {

      jQuery.validator.addMethod('SelectNone', function (value, element) {
        return this.optional(element) || (value.indexOf("-- Please Select --") == -1);

How to localize "field is required" validation error message in mvc musicstore sample

I tried to localize codeplex mvc musicstore sample in .NET 3.5
I replaced "field is required"  message in all files with localized text.

In login of register screen, if some fields are empty, pressing enter still shows english language text like

The UserName field is required.

How to localize this validation message ?


Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

Error Message when trying to open crystal report


Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim Count As Int32
        Count = Int32.Parse(Label1.Text)

        Dim ConnInfo As New ConnectionInfo
        With ConnInfo
            .ServerName = "\\Server1\Sqlexpress"
            .DatabaseName = "DATA"
            .UserID = "sa"
            .Password = "1181

Go Global: Make the .NET World a Friendlier Place with the Many Faces of the CultureInfo Class


CultureInfo is a complex .NET class whose objects are used for resource loading, formatting, parsing, casing, sorting, and other conventions that change as the language, location, or writing system is changed. It can be tricky to use correctly in every situation. Here Michael Kaplan explains some common scenarios in which you will use CultureInfo and provides information about the behavior, best practices, and consequences of a wrong decision.

Michael Kaplan

MSDN Magazine March 2005

Design: Place XML Message Design Ahead of Schema Planning to Improve Web Service Interoperability


Web Services are all about exchanging data in the form of XML messages. If you were about to design a database schema, you probably wouldn't let your tool do it for you. You'd hand-tool it yourself to ensure maximum efficiency. In this article, the author maintains that designing a Web Service should be no different. You should know what kind of data will be returned by Web Service requests and use the structure of that data to design the most efficient message format. Here you'll learn how to make that determination and how to build your Web Service around the message structure.

Yasser Shohoud

MSDN Magazine December 2002

Weird security configuration error message


Recently something has gone wrong with our website so that whenever you try to access an aspx file, it shows the following error:


Server Error in '/RALSWeb' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Access is denied: 'RalsWeb'.

Source Error:

Line 256:                <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 257:                <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 258:                <add assembly="*"/>
Line 259:            </assemblies>

JQuery vs MS client validation


I have been trying both MicrosoftMvcJQueryValidation.js and MicrosoftMvcValidation.js.

The former does not support validation summarie, while the latter does.

Neither one of them seems to be able to deal with System.ComponentModel.DataAnnotations.DataType markings on the client side. It somewhat defeats the purpose of having the attributes on the server side. I know the validation on the server side works, but I need it to work on the client too.

Is there an easy way to make the client side validation for that work?

Are there any updates to these javascript libraries that I am may not be aware of?

Parser Error Message: Could not load type MasterPage File



Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'wamsilverlight.Web.Wam'.

Source Error:

Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Wam.master.cs" Inherits="wamsilverlight.Web.Wam" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /Wam.Master    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927


All of the following have been tried over and over again:

1.) Delete all existing .dlls

2.) Delete MasterPage File and recreate it.

3.) Delete MasterPage perform a c

Error on Jquery Date Picker


HI all,

 I am using a Jquery datepicker in my project.There are a lot of pages where I use this date picker and w henever I select any date 

from that ,am getting an error  "length is null or not an object error on line 173"


The HMML for my datepicker control is

<input type="text" id="dpAgreementExpDate" runat="server" maxlength="10" />

Error message when selecting a row in webdatagrid



I have a webdatagrid control that is loaded by using an sqldatasource.  I have add and edit methods that behave correctly, however, I have a problem when I delete a row.   I can delete the row correctly from the datagrid and the database, but as soon as I select another row in the grid straight after, I get an error:

Microsoft JScript runtime error: 'undefined' is null or not an object


There are no events wired up to the row select, so it doesn't appear to be that.


Can anyone help?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend