title: ASP.Net User Control - VS Event Wireup
body: <p>So i've got a custom user control. I have an event (SelectionChanged) and I'm wanting to have who ever uses my control to do the following to hook up the event:</p>
  
  <ol>
  <li>drag the control to the page</li>
  <li>in designer mode, click on the control</li>
  <li>view the controls event handlers (from the properties window)</li>
  <li>find the SelectionChanged event</li>
  <li>double click and let visual studio create the code behind function and the wire-up on the aspx page.</li>
  </ol>
  
  <p>How do i get this done? I've got the control setup so that the user can manually type in the event wire-up and code behind event by hand, but i want Visual Studio to do this.</p>
  
  <p>Currently, when the a developer has dropped my control on the page, they can click on it and see the properties but no events are available (the lightning bolt isn't even there).</p>
  
  <hr>
  
  <p>My events are public. Here they are:</p>
  
  <pre><code>public delegate void SelectionChangedDelegate(object sender, SelectionChangedEventArgs e);
  public event SelectionChangedDelegate SelectionChangedEvent;
  </code></pre>