4
Vote

Error with MaskedEditValidator

description

When i try to use the MaskedEditValidator I get a NullReferenceException

That is the Call stack location

AjaxControlToolkit.DLL!AjaxControlToolkit.MaskedEditValidator.OnPreRender(System.EventArgs e ) Line 360 + 0X29 bytes

and Source file information:

Locating source for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\MaskedEdit\MaskedEditValidator.cs'. Checksum: MD5 {ea 2f 74 58 2f 82 7f 77 98 d9 88 ba c4 e0 18 25}
The file 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\MaskedEdit\MaskedEditValidator.cs' does not exist.
Looking in script documents for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\MaskedEdit\MaskedEditValidator.cs'...
Looking in the projects for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\MaskedEdit\MaskedEditValidator.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\MaskedEdit\MaskedEditValidator.cs.
The debugger could not locate the source file 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\MaskedEdit\MaskedEditValidator.cs'.

comments

jfouimet wrote Aug 17, 2011 at 3:50 PM

I am getting the same error message on my dev machine,

However, other AJAX controls work fine (CalendarExtender, MaskedEdit)...

I cannot use a MaskedEditValidator.

VS2010 SP1, on WinXP SP3.

Anyone have a solution to this issue ?

flipxfx wrote Sep 26, 2011 at 8:07 PM

I wish this would be fixed soon. I really wish I could use the MaskedEditValidator.

lpeters wrote May 4, 2012 at 5:45 PM

I am having this error too and I have not found a solution that is valid yet. This is a source code error and the "experts keep wanting to resolve this either in Web Config or to make sure that you have AJAX installed. If the tool is available to use at this point it would seem like a logical conclusion that it is also installed.

timhoffmann wrote May 30, 2012 at 1:53 PM

I am getting the same error, but only occasionally. The rest of the Toolkit items work fine and the MaskedEdit works most of the time, too, this is a random event for my page.

aeciolemos wrote Dec 11 at 9:14 PM

I am getting that same error with the MaskedEditValidator.

Is this a build error in the project?

Full error message from webpage in my dev environment:

Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

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:


[NullReferenceException: Object reference not set to an instance of an object.]
AjaxControlToolkit.MaskedEditValidator.OnPreRender(EventArgs e) in f:\TeamCity\buildAgent\work\80acd78aa4c25314\Server\AjaxControlToolkit\MaskedEdit\MaskedEditValidator.cs:360
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237

aeciolemos wrote Dec 11 at 9:29 PM

I solved the issue. I had forgotten the ControlExtender property. But the error should be clearer.