Is there a quick way to create a <% @Register ...%> string for a custom control?

  • I am making a custom control and then I want to include it in the page
  • I have to always manually enter the @Register line at the top of my .aspx file like

    <% @Register TagPrefix = "edward" TagName = "GetQuote" src = "~ / Controls /GetQuote.ascx"%>

  • Is there a way to automatically generate these @Register lines?

(I tried to drag the .ascx file from Solution Explorer, doesn't work.)

The problem has been resolved. : I was dragging into original view instead of design view. Thanks to DilbertDave.

0


source share


2 answers


I don't have this problem - are you dragging to aspx in source or project mode?



Dragging and dropping in Design mode creates a Register line for me.

+2


source


try adding your control to the toolbar (via Tools> Select Toolbar Items) and then dragging it onto your page from the toolbar? (your controls must be in a separate DLL)



+1


source







All Articles