怎么让web自定义控件在设计模式任意摆放

atian25 2003-10-30 08:09:19
怎么让自己写的web自定义控件可以在设计模式的页面中任意摆放
就是添加到选项卡,在设计模式随便拖放位置,让vs自动生成style
...全文
64 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
atian25 2003-10-31
  • 打赏
  • 举报
回复
你添加引用看看
yaoxh 2003-10-31
  • 打赏
  • 举报
回复
在ASP。NET中能够使用我以前用VB6写的客户端OCX控件吗?
saucer 2003-10-30
  • 打赏
  • 举报
回复
Control doesn't have position parameters,

public class Composition1 : WebControl, INamingContainer

and also, make sure you are using GridLayout instead of FlowLayout
atian25 2003-10-30
  • 打赏
  • 举报
回复
喔,我是按quickstart里的.
public class Composition1 : Control, INamingContainer
webdiyer 2003-10-30
  • 打赏
  • 举报
回复
只要你的控件是从WebControl及其子类继承,那么拖放到页面上后和其它控件一样,vs.net会自动生成一些象绝对定位的style等代码的,不知道你的控件是怎么写的?
atian25 2003-10-30
  • 打赏
  • 举报
回复
不好意思,可能是我的表达不好.
我知道怎么把一个自己的DLL加到选项卡.
我是问从选项卡拖到aspx中后,它的定位.
不能像textbox等拖出来后,随便摆放位置,它的相对位置等style由vs自动生成.
rgbcn 2003-10-30
  • 打赏
  • 举报
回复
see
ms-help://MS.MSDNQTR.2003JUL.1033/vbcon/html/vbwlkwalkthroughcreatingcustomwebcontrols.htm
rgbcn 2003-10-30
  • 打赏
  • 举报
回复
Adding the Control to the Toolbox
Now that your control has been compiled and you have a Web Forms page ready to test it, you can add the control to the Toolbox so it will be readily available for use.

To add your control to the Toolbox

On the Tools menu, click Add/Remove Toolbox Items.
On the .NET Framework Components tab of the Customize ToolBox dialog box, click the Browse button. Find CustomLabel.dll, select it, and click Open to add WebCustomControl1 to the list of components in the Customize Toolbox dialog box.
Select WebCustomControl1 in the list of .NET Framework components and click OK. WebCustomControl1 is added to the Toolbox.
When you are finished, you should see an icon on the toolbar that looks like this:

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧