UserControl继承自Ajax ComboBox [英] UserControl Inherit from Ajax ComboBox

查看:70
本文介绍了UserControl继承自Ajax ComboBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我需要一个与Ajax ComboBox相同的控件,我想对其进行一些编码
在回发中,还可以在ClientSide中创建新的javascript数组
该用户控件.

我想将此用户控件构建为dll,以便可以将其添加为参考
在我的项目中.
我的控件应继承如下:

Dear All,

I need a control that is the same as Ajax ComboBox which I want to make a little coding
in postback and also create new javascript array accesible in ClientSide
for that User Control.

I want to build this User Control as a dll so I could be able to add it as a reference
in my project.
My Control should inherit as follows:

public class MyComboBox : AjaxControlToolKit.ComboBox


问题是:如何在VS 2010中进行此用户控件?请提出任何想法.


The question is: How can I make this usercontrol in VS 2010? Any ideas please.

推荐答案

这可以帮助您
http://msdn.microsoft.com/en-us/library/dd483476.aspx
This could help you out
http://msdn.microsoft.com/en-us/library/dd483476.aspx


说实话,您快到了.您可以创建一个类库项目,并按照以下建议进行操作:

You''re almost there, to be honest. You can create a class library project and do as you propose with:

public class MyComboBox : AjaxControlToolKit.ComboBox



然后,您可以在Web项目中引用该项目,并使用自己的派生控件.如果需要视觉设计器支持,则需要做更多的工作,请在ASP.net服务器控件的设计时支持上进行搜索以获取更多信息.



you can then reference the project in your web project and use your own derived control. if you want visual designer support you''re going to have to do a bit more, do a search on design time support for ASP.net server controls for more info.


这篇关于UserControl继承自Ajax ComboBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆