How to reuse web user controls from another project in the solution?

ehsan shirzadi

I want to use web user controls inside 'Controls' project inside the 'Web' project in the same solution. but when I reference 'Web' to 'Controls' and then drag the control into a web form in 'web' project the Register directive's src is like this:

<%@ Register src="http://localhost:59388/UC/Menu/MenuManager.ascx" tagname="MenuManager" tagprefix="uc1" %> 

and an error says:

http:/localhost:59388/UC/Menu/MenuManager.ascx' is not a valid virtual path.

Some people say thay It's not possible to reuse web user controls and we have to convert them to Server controls, but I've seen somewhere some one did this. Do you know how to do this?

Srikanth Venugopalan

You cannot use an ascx via http. Essentially you are trying to get the ASP.NET compiled and processed output of the user control if you do that.

You are better off writing a Control Library if you plan to share controls. See this question

Scott Guthrie has a write-up about creating User Control Libraries

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Reuse SpecFlow steps in another project in the same solution

From Dev

Copy User Control from one project to another within same solution

From Dev

Web API and moving DTO from same project to another solution

From Dev

How to prevent reuse of password hash by another user

From Dev

How to access another project from the same solution? (Visual Studio 2012)

From Dev

How to include files from another project while publishing a solution with clickonce

From Dev

How to access another project from the same solution? (Visual Studio 2012)

From Dev

Visual Studio 2015 - How to reference a project from another solution?

From Dev

How to open sql project/solution from my Desktop to another laptop?

From Dev

sympy: how to save solution from "solve" for reuse?

From Dev

Front end ASP.NET MVC4 as one project, and an ASP.NET Web API as another project in same solution - how to call WebAPI from front end?

From Dev

Front end ASP.NET MVC4 as one project, and an ASP.NET Web API as another project in same solution - how to call WebAPI from front end?

From Dev

How to stop visual studio 2013 hanging when loading a solution with a project from another solution

From Dev

How to give user input to custom powershell cmdlets from another project

From Dev

Angularjs - unable to call web api service from another project of same solution - VS2015

From Dev

How to reuse example from another definition in swagger?

From Dev

How reuse correctly controls at flowlayoutpanel?

From Dev

How to navigate to another project inside same solution

From Dev

How to get all Forms and User Controls in WinForms project?

From Dev

How can I access models from another solution in the same ASP.NET MVC 4 project

From Dev

How do I copy a web reference from one solution to another in Visual Studio 2013

From Dev

How to build project from another project in TeamCity?

From Dev

How can I reuse code from one JavaScript file in another?

From Dev

MVC Redirect from one project to another in one solution

From Dev

Accessing Resource files from another project of same solution C#

From Dev

Reuse documentation from another namespace

From Dev

Reuse a Spring test context in another project

From Dev

How to Import or copy the input controls from 1 topic to another?

From Dev

How to authenticate programmatically when running an Apps Script Web App from another Apps Script project

Related Related

  1. 1

    Reuse SpecFlow steps in another project in the same solution

  2. 2

    Copy User Control from one project to another within same solution

  3. 3

    Web API and moving DTO from same project to another solution

  4. 4

    How to prevent reuse of password hash by another user

  5. 5

    How to access another project from the same solution? (Visual Studio 2012)

  6. 6

    How to include files from another project while publishing a solution with clickonce

  7. 7

    How to access another project from the same solution? (Visual Studio 2012)

  8. 8

    Visual Studio 2015 - How to reference a project from another solution?

  9. 9

    How to open sql project/solution from my Desktop to another laptop?

  10. 10

    sympy: how to save solution from "solve" for reuse?

  11. 11

    Front end ASP.NET MVC4 as one project, and an ASP.NET Web API as another project in same solution - how to call WebAPI from front end?

  12. 12

    Front end ASP.NET MVC4 as one project, and an ASP.NET Web API as another project in same solution - how to call WebAPI from front end?

  13. 13

    How to stop visual studio 2013 hanging when loading a solution with a project from another solution

  14. 14

    How to give user input to custom powershell cmdlets from another project

  15. 15

    Angularjs - unable to call web api service from another project of same solution - VS2015

  16. 16

    How to reuse example from another definition in swagger?

  17. 17

    How reuse correctly controls at flowlayoutpanel?

  18. 18

    How to navigate to another project inside same solution

  19. 19

    How to get all Forms and User Controls in WinForms project?

  20. 20

    How can I access models from another solution in the same ASP.NET MVC 4 project

  21. 21

    How do I copy a web reference from one solution to another in Visual Studio 2013

  22. 22

    How to build project from another project in TeamCity?

  23. 23

    How can I reuse code from one JavaScript file in another?

  24. 24

    MVC Redirect from one project to another in one solution

  25. 25

    Accessing Resource files from another project of same solution C#

  26. 26

    Reuse documentation from another namespace

  27. 27

    Reuse a Spring test context in another project

  28. 28

    How to Import or copy the input controls from 1 topic to another?

  29. 29

    How to authenticate programmatically when running an Apps Script Web App from another Apps Script project

HotTag

Archive