Error : specific argument was out of range of valid value parameter name : index
This error message occurred every 2min in design time!!
what should i do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The designer executes code from controls on the design surface at design time. This error is probably coming from code in one of your UserControls, or possibly a buggy third party control.
Things you can do to help prevent code being executed at Design Time:
Avoid putting such code in the constructor of your UserControl.
Use
if (this.DesignMode)to conditionally suppress the code at design-time. It’s common to do this in theOnLoadmethod.Mark properties in your usercontrol that should not be evaluated at design-time with appropriate attributes, e.g.:
If all else fails, you can start a second instance of Visual Studio, and attach its debugger to your instance that’s running the Designer. Then break on the appropriate exception.