如何在网页中继承类? [英] How to inherits class in webpage?

查看:81
本文介绍了如何在网页中继承类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立了一个网站,我允许用户选择任何语言,并以所选语言为基础的语言阅读网页。因为我的课程在asp.net vb中有名称my_class。我为不同的语言创建了一些资源文件。

现在问题是当我在default.aspx.vb文件中继承类时,已经有一个类继承有名称system.web.ui

我不知道如何继承课程my_class



我尝试过:



我试图找到上述问题的答案,但我无法得到满意的答案。我知道我们也可以在同一页面中继承多个类。

如果我们删除system.web.ui,数据将只是一堆文本没有调用任何事件。不知道该怎么做:

I make a website in which i allow user to select any language and base on that language read webpage in selected language.for that i make class has name my_class in asp.net vb. I make someresources file fordifferent language.
now the problem is when i inherits class in default.aspx.vb file there is already one class inherits has name system.web.ui
I don't know how to inherits class my_class

What I have tried:

I tried to find answer for above problem but i cant get satisfy answer. i get that we can nor inherits more then one class in same page.
and if we remove system.web.ui the data will be just a bunch of text has no call any event. don't know what to do:

推荐答案

让my_class继承System.Web.UI.Page然后你可以让你的webform类继承my_class。
Make my_class inherit System.Web.UI.Page and you can then make your webform class inherit my_class.


这篇关于如何在网页中继承类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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