更新 WebForm 中的数据

发布于 2025-01-03 21:07:30 字数 300 浏览 2 评论 0原文

我是开发 ASP.NET WebForms 应用程序的新手。我有一个在 WinForms 上运行的应用程序。 我的主 WinForm 包含一个控件,在建立与远程服务器的连接后,它接收值以在表单中某些标签的属性 Text 中可视化。该控件在运行模式和设计模式下的工作方式相同(我使用的是 VS2010)。 我需要拥有与 WebForms 中相同的控件。我重写了在 WebForms 中工作的控件。我获得了与 WinForms 中相同的行为,但我无法使用显示的新数据更新/刷新标签。我哪里做错了?为什么在这两种情况下我都看不到显示屏上的变化?

欢迎任何帮助,提前谢谢您。

I'm new in developing ASP.NET WebForms application. I have an application that works on WinForms.
My main WinForm contains a control that after establishing a connection to a remote server, it receives values to visualise in the property Text of some labels in the Form. This control works in the same way in Running Mode and in Design mode as well (I'm using VS2010).
I need to have the same control that works in WebForms. I re-writed the control for working in WebForms. I obtained the same behaviour that I had in WinForms but I'm not able to update/refresh the labels with new data on display. Where am I doing wrong? Why can't I see the changes on the display in both cases?

Any help will be welcome, thank you in advance.

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

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

发布评论

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

评论(1

虫児飞 2025-01-10 21:07:30

我不清楚,您绑定哪个控件,例如,如果您将其与 gridview 绑定,则需要在添加/编辑后调用 DataBind() 方法,或重定向页面以加载新数据

im not clear, which control you bind with, for example if you bind it with gridview you need to call DataBind() method after add/edit, or redirect page to load with fresh data

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