Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
复合控件渲染后有什么方法可以调用javascript函数。我需要在图像控件的顶部放置四个可移动的锚点。我计划使用 html Img 控件来实现锚点。我已经嵌入了一个 javascript 资源,但我无法在图像控件上绘制锚点
不,你不能用 javascript 来做到这一点。但你可以在背景代码中使用覆盖渲染来做到这一点。
像这样:
受保护的覆盖子渲染(ByVal writer As System.Web.UI.HtmlTextWriter)
'you can composite control rendering here. MyBase.Render(writer)
结束子