Why does ASP.NET auto-generated .designer code have the incorrect type?

后端 未结 2 1206
独厮守ぢ
独厮守ぢ 2021-01-06 03:21

I\'m working on a hack to the DotNetNuke Events module. I\'ve got the source set up and it built A-OK without modifications. However, when I change the EventMonth.ascx fil

相关标签:
2条回答
  • 2021-01-06 03:54

    Because the project doesn't start at the application root, you have to tell the project where the real application root is before it will be able to resolve the ~ correctly. Go into the Web tab of the project's properties, and make sure that "Use Local IIS Web server" is selected under the "Servers" header. Set the Project URL to the URL to your specific project (i.e. http://localhost/DotNetNuke_2/DesktopModules/Events). Then, check the Override application root URL and set that to the application's root URL (i.e. http://localhost/DotNetNuke_2). This will allow the web application project to know how to find those controls.

    The Src attribute is relative to the control, so it should work fine to just set it to "EventIcons.ascx" rather that specifying it from the root of the application.

    0 讨论(0)
  • 2021-01-06 04:12

    ~ resolves to the root of the application folder.

    0 讨论(0)
提交回复
热议问题