运行时和设计时添加的控件

发布于 2024-12-26 07:45:29 字数 115 浏览 5 评论 0原文

谁负责维护在设计时添加的Web 控件(ASP:Button),以便在执行postBack 后可用?如果您不重新添加运行时添加的控件,它们将不可用?

Who is responsible to maintain the web controls (ASP:Button) for example that added in the design time to be available after doing postBack? while run-time-added controls wont be available if you do not add them back again?

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

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

发布评论

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

评论(2

罪歌 2025-01-02 07:45:29

ASP.NET 是负责人。您在设计时添加的控件(ASPX 或 ASCX 文件)将与代码隐藏类一起编译为单个对象。这是由编译器完成的。由于添加到页面运行时的控件在编译器执行时不可用,因此无法保留它们,您应该小心地自行执行此操作。

ASP.NET is the one responsible. Controls that you have added in the design time (ASPX or ASCX file) are compiled together with the code-behind class into a single object. This is done by the compiler. Since controls that you add to the page runtime are not available when the compiler executes, they cannot be preserved and you should take care to do it yourself.

﹏雨一样淡蓝的深情 2025-01-02 07:45:29

ASP.NET 后端负责此工作。

请注意,没有“设计时添加”和“运行时添加”控件。只有静态、始终和动态地位于页面中的控件,由页面自己的(=您的)逻辑决定。

The ASP.NET backend is reponsible for that.

Note that there are no “design-time added” and “run-time added” controls. There are just controls that sit in the page statically, always, and dynamically, decided by the page's very own (=your) logic.

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