Are you are seeing this javascript error when you try to run a page with a ModalPopupExtender in it?
Error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: element
Then the fix is probably pretty simple - you have put incorrect ID's in either the OkControlID or CancelControlID attributes.
You don't have to specify the OkControlID or CancelControlID's to use the ModalPopupExtender but if you do and you later rename the control or you simply mistype when setting it up the compiler will not catch this.
The error message could be more helpful but hopefully you will have found this article in your favourite search engine without much trouble!
Here is the official documentation and demo page for this control:
18 comments :
thx m8
Thanx buddy....it works....i rechecked both ids of ok and cancel button..a littlebit mistake was there.......Thanx..
Excellent!!! Thank you sooooo much!!!! You have made my day!!!
Thankssss a lotttt
Thanks, it worked!
thanx a lot brother for this info..it's very usefull !!!!
Man thanks! Merci beaucoup! I copied and pasted big chunks of code from one page to another one. What happened is in the new page, some controls with same name already existed, so Visual Studio stealthily renames my controls (some button) so the modalpopup extender exploded :) I just renamed the attribute with the newly attributed name of my button and yes it works like a charm. May I share this info everywhere but also give the link to your post because you deserve the credit obviously!
Thanks,, saved me in the right time.
great advice!! you saved me so many time.... thnks
great advice... thanks !!
Many thanks.
Life saver... exactly what I had; using modalpopupextender.
In my case, I actually was missing a line for an element that needed to be there.
Problem solved.
Thanks!
This seems to be the only source of this little gem on the web.
Worked a treat!
JG
Thanks. Just the right answer. Saved me a ton of time.
Hey Dude...
Awesome find...just found the same mistake..You saved lot of time of mine... :)
Thanks
Thanks! Great fix, this solved my problem and saved my project
Thanks changing the correct canclecontrolid solved my error.
Or, if you set Visible = False on the control specified in the CancelControlID, you'll also get this error. But this post helped out a lot! Thanks.
Post a comment