我正在尝试创建一个简单的用户控件,它是一个滑块.当我向用户控件添加AjaxToolkit SliderExtender时,我得到了这个(*&$#()@#error:
Server Error in '/' Application. The Controls collection cannot be modified because the control contains code blocks (i.e. `<% ... %>`). Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. `<% ... %>`).
Source Error:
An unhandled exception was generated …Run Code Online (Sandbox Code Playgroud) 我们在主页中包含javascript时遇到了一些麻烦."〜/"根快捷方式似乎不起作用,因此我们必须手动输入将使用它的javascript路径,例如:"../../tooltip.js"
但是,问题是如果嵌套页面位于不同的路径中,这种方法不起作用,因为尽管嵌套页面位于不同的位置,路径保持不变 - 任何关于如何使路径自动工作的解决方案都像它一样对于css文件?
谢谢!