title: Error While setting the property in User control
body: <p>I am using a user control using <code>vb.net</code>. It include the program to retrieve the values from database while giving the paramers. When I set the property from my main program i am getting an error "<strong>Invalid attempt to call Read when reader is closed</strong>." When i gone to the online help i got the message as follows</p>
  
  <pre><code>"System.InvalidOperationException (.NET Framework 4)
  </code></pre>
  
  <p>The exception that is thrown when a method call is invalid for the object's current state. InvalidOperationException is used in cases when the failure to invoke a method is caused by reasons other than invalid arguments. For example, InvalidOperationException is thrown by <code>IEnumerator.MoveNext</code> if objects of a collection are modified after the enumerator is created, or ResourceSet.GetString if the resource set is closed before the method call is made. If the method invocation failure is due to invalid arguments, then ArgumentException or one of its derived classes, ArgumentNullException or ArgumentOutOfRangeException, should be thrown instead.
  Versions: 1.1, 2.0, 3.5, Silverlight  <code>Assembly: mscorlib.dll</code><br>
  Common Methods/Properties: 
  InnerException Message Source<br>
  "</p>
  
  <p>Can anybody explain how to overcome it!......</p>