Problem solve Get help with specific problems with your technologies, process and projects.

Removing defunct references

The "Protected WithEvents" lines within Form.aspx.vb frequently contain references to defunct controls on Form.aspx. Here's a quick way to remove these.

Please let other users know how useful this tip is by rating it below. Do you have a tip or code of your own you'd like to share? Submit it here.


The "Protected WithEvents" lines within Form.aspx.vb frequently contain references to defunct controls on Form.aspx. The quickest way to remove these is simply to delete all the "Protected WithEvents" lines, save, and then switch to the design view and click on a control. The "Protected WithEvents" lines in Form.aspx.vb will then be re-populated with only the current controls.

In an extreme case (where a form had been created by copying an existing one), so much dead code was subsequently identified that an 800 line code behind file was reduced to less than 200 lines.

Dig Deeper on Win Development Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close