March 21, 2007

Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: id

I got the following Javascript error a couple of days ago that I had not seen before:

Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: id

This was from a page that included some form fields, some validators, and was wrapped inside an ASP.NET AJAX UpdatePanel. This had all worked fine before. I had added some other things to the page so I was systematically removing them until I could find the cause of the problem. I eventually turned to a Google Search which led me to the fantastic ASP.NET forums and finally to a blog post from Matt Gibbs that explained the issue and offered a fix.

Apparently there is a problem when using validators inside an update panel that was introduced with ASP.NET AJAX RTM. Matt says that there is a fix coming in a future windows update, but for now he has a link to a set of custom validator controls that you can download, drop the compiled DLL in your bin folder, and add his provided tagMapping section to the web.config. Plenty of more details along with the download can be found in his post.

The fix worked for me. I am still getting a javascript error with IE, a different error, but Firefox works fine. At least the page works now and I can live with it for the time being.  

Comments,

  • Trackbacks,
  • and Pingbacks
  1.  avatar jonx says:

    Hello,

    I also got that problem but at the end it seems that it was not directly related to my validators.

    Yes, I have validators inside an update panel, but the problem was that I added event handlers to objects the wrong way.

    For exemple, I used

    $addHandler(control, 'focus', disableTimer()); instead of

    $addHandler(control, 'focus', disableTimer);

    The hint was that this was part of the latest modifications to my web site. Before I added that it was working...

  2.  avatar Rabi says:

    Guys,

    Thanks a lot for ur help, i was searching for a solution using javascript to validate controls :s

    but it looks better with the dll file that i included in my BIN directory.

  3.  avatar Irfan Lateef says:

    I have Asp:RadioButtonList in the update panel, and i have been used the property of autopostback true because i want to take event like visible true or false, when i select the radio then i got this error, please help me any one have solution of my problems

  4.  avatar Johann says:

    Thank you! You are a life-saver!

    For some reason, the one page I had validationcalloutextenders on, just stopped working! I've been trying to figure it out for hours and thankfully found this page.

    Note to self: When in doubt, Google first!

    Thank you for the help, Dan.

  5.  avatar Vishal says:

    Thanks For Giving Suggetion of this problem.

Comments are closed.

Shortcuts

Where is Dan?


My Blog
My Blog
Twitter
Twitter
Facebook
Facebook
LinkedIn
LinkedIn
Flickr
Flickr
YouTube
YouTube
Delicious
Delicious
Foursquare
Foursquare
Pinterest
Pinterest
GetGlue
GetGlue
Pintley
Pintley
XBOX Live
XBOX Live
Last.fm
Last.fm
Windows Live
Windows Live
Telligent.com
Telligent
Graffiti CMS on CodePlex
Graffiti CMS
Popular

Recent Posts