It does not work to drag a web user control into a web page

Discussion in 'ASP .Net' started by Tony Johansson, May 16, 2011.

  1. Hello!

    According to the book I read and the documentation on the web it should work
    to drag a user control into a web page which should automatically create the
    register directive and so on.

    If I manually add these to the web page it works fine
    <%@ Register src="~/Footer.ascx" tagname="Footer" tagprefix="aPress" %>
    <aPress:Footer ID="Footer1" runat="server" />

    but if I drag a user control the ascx file into the design view for the
    aspx file it doesn't work.
    When I drag a ascx file(web user control) into a web page when the design
    view is shown I get the following
    <a href="#/slask3/Footer.ascx">Footer.ascx</a>
    which is wrong.

    Can somebody explain why it's not working.
    I use VS 2008 Professional Edition.

    Tony Johansson, May 16, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.