I have a form which I have created in Visual Studio and there are some controls on there with strange names which have events associated with them. I think the controls have been added in error. They are labels. I can't see them on the form, they must have no text or be behind something. How can I find them?
The Toolbox window displays controls that you can add to Visual Studio projects. To open Toolbox, choose View > Toolbox from the menu bar, or press Ctrl+Alt+X. You can drag and drop different controls onto the surface of the designer you are using, and resize and position the controls.
FindControl("TextBoxID"); Or you may find this textbox directly inside the grid view row (if the textbox id is unique in the page) as follows: TextBox txt = (TextBox)gr. FindControl("TextBoxID");
Add the control by drawing Select the control by clicking on it. In your form, drag-select a region. The control will be placed to fit the size of the region you selected.
Use the View + (Other Windows) + Document Outline menu command. You'll get a tool window that displays all the children of the form. You can drag+drop a control up to its container to put it on top of the Z-order, in case such a label is covered by another control. Or right-click a rogue one and select Delete. Edit + Undo if you made a mistake.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With