如何更新 WebMethod 中的多个标签 (Asp:net / Ajax)
我有大约 20 个标签需要更新。
考虑到性能和padeload-weight,我选择WebMethods来实现它(比updatepanel +计时器小得多)。
那么,如何更新WebMethod中的大量值呢?
(我的第一个意图是像我一样正常访问它们:lbl1.Text =“1”;lbl2.Text =“2”......但该方法是静态的 - 没有机会)。
I have around 20 labels to update.
In relation to performance and padeload-weight, I choose WebMethods to realize it (Much smaller then updatepanel + timer).
So, how to update a lot of values in the WebMethod?
(My First intention was to access them normaly as I do: lbl1.Text = "1"; lbl2.Text = "2".... but the method is static - no chance).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建类似的方法(选择一些更方便的名称:-))。
然后用 JavaScript 来完成,就像
“啊,好吧,这样你就可以开始了”。
Create your method something like (choose some more convenient names tho :-)).
And do it in JavaScript like
Ah well, that'd get you started.