用户控制的替代方案

发布于 2024-10-10 11:03:50 字数 84 浏览 2 评论 0原文

除了 webpart 和 iframe 之外,还有其他用户控件的替代方案吗?我可以在我的 asp.net 应用程序中使用它们。

提前致谢。

Is there any other alternative of usercontrol other than webpart and iframe, Which i can use in my asp.net application.

thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

滿滿的愛 2024-10-17 11:03:50

不知道你想要实现什么,但在我的脑海中,我可以说你可以使用更新面板作为一种 iframe 来加载页面内的另一个页面。

Don't know what you are trying to achieve but at the top of my head I can say you can use an update panel to act as a type of iframe to load another page inside your page.

花间憩 2024-10-17 11:03:50

用户控制已经尽可能抽象:它的最终目标是根据您从服务器端提供的参数向浏览器发送某些内容。标签具有 Text 属性,一旦设置,将使用给定文本将 标记发送到浏览器。 Panel 具有子项集合,设置后将其发送到封装在

元素中的浏览器。等等等等..

所以直接的答案是:不,别无选择。

但是,根据您的评论,可能有一种方法可以提高性能......您目前拥有什么控制权?用户如何定制它们?如果您能更好地解释该场景并发布一些相关代码,那就太好了。

User control is already as abstract as possible: it's final and ultimate goal is to send something to the browser, based on parameters you give it from the server side. Label has Text property that once set, send <span> tag to the browser with that given text. Panel has collection of children that when set are sent to the browser wrapped in <div> element. Etc Etc..

So the direct answer is: no, no alternative.

However, based on your comment, there might be a way to improve the performance.. what control you currently have? How user can customize them? If you can explain better the scenario and post some relevant code it would be great.

哆啦不做梦 2024-10-17 11:03:50

考虑到您对这个问题的评论,使用用户控件以及占位符和一些 jQuery 插件或简单地使用 Web 部件控件作为容器就可以了。

除非您遇到问题,否则无需更改它。然后我们可能会讨论其他选项,例如自定义服务器控件等......但这些选项也有其问题等......所以它始终是一个平衡。

如果你没有问题并且想检查这是否是你所做的正确的事情或其他事情,那么我认为答案是,是的。除非您有具体问题,否则这种方式似乎可以。

Considering your comment on the question, Using usercontrols along with placeholders and some jQuery plugins OR simply web parts controls as containers is fine.

No need to change it unless you have a problem with it. Then we might discuss other options like Custom Server controls etc.. but those also have their issues, etc.. so it's always a balance.

If you have no problem and want to check whether this is the right thing that you do or something else, then I think the answer is, yeah. Unless you have specific issues, this way seems OK to go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文