在vs2010中创建自定义控件(Web控件库) [英] Create a Custom Control(web control library) in vs2010

查看:237
本文介绍了在vs2010中创建自定义控件(Web控件库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 在VS的最新版本中,有2个主题:用户控制和自定义控制
在VS2010中,我找不到自定义控件",但是在文件-> new-> project-> web
中 我找到了ASP .Net服务器控件.
VS的最新版本中的自定义控件"是否相同?
如果没有,如何在vs2010中创建自定义控件(Web控件库)
非常感谢

Hi In last versions of VS there are 2 topics: User Control and Custom Control
in VS2010 I didn’t find Custom Control but in file->new->project->web
I found a ASP .Net Server Control.
Is it same the "Custom Control" in last version of VS?
If not ,how Can I Create a Custom Control (web control library) in vs2010
Thanks very much

推荐答案

我没有从VS 2010中消失的旧版本中找到任何内容.

UserControl不同,自定义控件只是从基类Control派生的一个类,或者是派生类之一.只需编写其代码即可:

I did not find anything from older versions which disappeared from VS 2010.

Unlike UserControl, Custom Control is simply a class derived from a base class Control or one of derived classes. Just write its code:

public class MyControl: Control {
   //your code goes here
}



—SA



—SA


尝试写得好的文章,它将指导您如何在VS 2010中创建自定义控件
创建使用Visual Studio 2010在ASP.NET中创建自定义Web服务器控件[
Try a well written article which will guide you how to create Custom Control in VS 2010
Creating a Custom Web Server Control in ASP.NET using Visual Studio 2010[^]


这篇关于在vs2010中创建自定义控件(Web控件库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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