views:

30

answers:

1

In Visual Studio 2008, if I wanted to drag a user control (that I have created) into the current page/control, I have to switch to Design view before dragging it into the pane. If I try to do it when the document is in Source view, it sends the markup as a hyperlink and not as the <%@ Register etc.. %> with the <uc1:usercontrol ... where I dragged it to.

Is there a way to change this behavior on the Source view?

A: 

Unfortunately, it appears that this behaviour cannot be altered.

If you want your page's mark-up to contain the correct mark-up for instantiating and registering your user control you must drag-and-drop it onto the Design View rather than the Source View.

To make it slightly easier, you can use the Split View in Visual Studio 2008 which will at least allow you to have both "views" available at the same time without having to "switch" between them.

CraigTP