[ASP.NET]继承和标签 [英] [ASP.NET] Inheritance and Label
问题描述
大家好,我想继承标签,我该怎么办?
我试过了:
1.制作一个新的Web用户控件,然后继承
System.Web.UI.WebControls.Label但不起作用!
2.创建一个类(。 cs文件)继承自Label Control
但它没有用!
任何想法?
7月16日下午3:02,RicercatoreSbadato< emailsolid ... @ yahoo.itwrote:
大家好,我想继承标签,我该怎么办?
我试过:
1.制作一个新的Web用户控件,然后继承
System.Web.UI.WebControls.Label但不能正常工作!
2.创建一个类(.cs文件)继承自Label Control
但是它没有用!
任何想法?
嗨...
如果你想扩展一个asp.net服务器控件你需要创建一个新的
自定义控件
继承自标签......
为此添加一个新的自定义Web控件项目在vs ...然后尝试...
谢谢
Md.Masudur Rahman(Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
我已经这样做了(但是它不起作用!)
-
公共部分类SuperLabel:System.Web.UI.WebControls.Label
{
protected void Page_Load(object sender,EventArgs e)
{
base.Text + =" .. inherited" ;
}
}
-
你试过吗?
i认为你从来没有尝试过..
7月16日下午3:09,RicercatoreSbadato< emailsolid ... @ yahoo.itwrote:
我已经这样做了(但它不起作用!)
-
公共部分类SuperLabel:System.Web.UI.WebControls.Label
{
protected void Page_Load(object sender, EventArgs e)
{
base.Text + =" .. inherited" ;;
}}
-
你试过吗?
i认为你从未尝试过它..
你能给我一个有效的例子吗?
嗨...
这里是一套完整的教程...如何开发自定义服务器
控制......
http://msdn2.microsoft.com/en-us/library/yhzc935f.aspx
谢谢
Md.Masudur Rahman(Munna)>
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
hi all, i''d like to inherit from a label, how can I do ?
i''ve tried:
1. making a new Web User Control, then inherit from
System.Web.UI.WebControls.Label but not works!
2. creating a class (.cs file) that inherits from the Label Control
but it didn''t work!
any idea ?
On Jul 16, 3:02 pm, RicercatoreSbadato <emailsolid...@yahoo.itwrote:hi all, i''d like to inherit from a label, how can I do ?
i''ve tried:
1. making a new Web User Control, then inherit from
System.Web.UI.WebControls.Label but not works!
2. creating a class (.cs file) that inherits from the Label Control
but it didn''t work!
any idea ?Hi...
if you want to extent a asp.net server control you got to create a new
custom control
which inherits from label...
for this add a new custom web control project in vs... and then try...
Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
i''ve done so (but it doesn''t work!)
--
public partial class SuperLabel : System.Web.UI.WebControls.Label
{
protected void Page_Load(object sender, EventArgs e)
{
base.Text += "..inherited";
}
}
--
do you have tried it?
i think you have never tried it..
could you post me a working example ?
On Jul 16, 3:09 pm, RicercatoreSbadato <emailsolid...@yahoo.itwrote:i''ve done so (but it doesn''t work!)
--
public partial class SuperLabel : System.Web.UI.WebControls.Label
{
protected void Page_Load(object sender, EventArgs e)
{
base.Text += "..inherited";
}}
--
do you have tried it?
i think you have never tried it..
could you post me a working example ?Hi...
here is a complete set of tutorials... how to develop a custom server
control...
http://msdn2.microsoft.com/en-us/library/yhzc935f.aspx
Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
这篇关于[ASP.NET]继承和标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!