没有INamingContainer的ASCX [英] ASCX without INamingContainer

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

问题描述

是否有可能在一个对象中加载ASCX

没有实现INamingContainer,但保留了

事件等的功能?


我知道我不能使用当前的Page函数执行此操作,但是如果我实现另一个处理程序,或者创建另一种类型的UserControl

没有实现INamingContainer和一个函数来做什么

LoadControl确实......不知道。


只是想知道是否有有没有办法做到这一点。


谢谢。

Is there any possibility to make an ASCX be loaded in an object that
does not implement INamingContainer, but mantain the funcionality of
events and etc?

I know i can`t do this using the current Page functions, but if I
implement another handler, or create another kind of UserControl that
doesn`t implement INamingContainer and a function that does what
LoadControl does... don`t know.

Just want to know if there is any way to do this.

Thanks.

推荐答案

你总是可以编写一个方法只是吐出HTML,或从磁盘上的文件中读取一个HTML片段并将其吐入页面。


-

Scott
http://www.OdeToCode.com/blogs/斯科特/


2004年12月11日星期六16:01:01 -0200,Natan< nv ******** @ mandic.com.br>

写道:
You could always write a method that would just spit out HTML, or read
an HTML fragment from a file on disk and spit it into the page.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 11 Dec 2004 16:01:01 -0200, Natan <nv********@mandic.com.br>
wrote:
是否有可能将ASCX加载到
未实现INamingContainer的对象中但是保留了
事件等的功能?

我知道我不能使用当前的Page函数来做这件事,但是如果我实现另一个处理程序,或者创建另一个那种没有实现INamingContainer的UserControl和一个做LoadControl所做的功能......不知道。

只是想知道是否有任何方法要做到这一点。

谢谢。
Is there any possibility to make an ASCX be loaded in an object that
does not implement INamingContainer, but mantain the funcionality of
events and etc?

I know i can`t do this using the current Page functions, but if I
implement another handler, or create another kind of UserControl that
doesn`t implement INamingContainer and a function that does what
LoadControl does... don`t know.

Just want to know if there is any way to do this.

Thanks.






Scott Allen写道:
Scott Allen wrote:
你可以写一个只会吐出HTML的方法,或者从磁盘上的文件中读取一个HTML片段并将其吐入页面。
You could always write a method that would just spit out HTML, or read
an HTML fragment from a file on disk and spit it into the page.




For我可以使用#include,甚至用户控件......

我需要的是一个不扩展INamingContainer的用户控件。它必须是一个编译控件来保存所有代码,事件和方法。



For that i could use #include, or even user controls....
What i need is an user control that doesn''t extend INamingContainer. It
must be a compiled control to keep all the code, events and methods.


ASP.NET中的用户控件实现了INamingContainer,I认为你

试图避免使用INamingContainer。你想要什么?b $ b最终完成 - 避免客户端身份证改变?


-

Scott
http://www.OdeToCode.com/blogs/scott/


On Sun,2004年12月12日08:09:20 -0200,Natan< nv *** @ mandic.com.br>写道:
User controls in ASP.NET do implement INamingContainer, I thought you
were trying to avoid INamingContainer. What are you trying to
accomplish ultimately - avoid the client side ID munging?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sun, 12 Dec 2004 08:09:20 -0200, Natan <nv***@mandic.com.br> wrote:
Scott Allen写道:
Scott Allen wrote:
你总是可以写一个只吐出HTML的方法,或者从一个HTML片段中读取一个HTML片段磁盘上的文件并将其吐入页面。
You could always write a method that would just spit out HTML, or read
an HTML fragment from a file on disk and spit it into the page.



为此,我可以使用#include,甚至是用户控件......
我需要的是一个用户控件,没有扩展INamingContainer。它必须是一个编译控件来保存所有代码,事件和方法。



For that i could use #include, or even user controls....
What i need is an user control that doesn''t extend INamingContainer. It
must be a compiled control to keep all the code, events and methods.






这篇关于没有INamingContainer的ASCX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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